Frank Kennison, 67, said he carried a Smith & Wesson revolver in his holster after being ordered by a senior officer to patrol the cell block where Mr Hill was in custody for questioning about the Guildford and Woolwich bombings nearly 20 years ago.
He told the Northern Ireland Court of Appeal in Belfast that, at one stage, he saw Mr Hill with his head in his hands crying as he sat on a bed in his cell. 'As far as I was concerned, I was to patrol the cell block to stop people breaking in and releasing Mr Hill or Mr Hill breaking out,' he said.
Mr Hill has claimed he was threatened with a gun before being forced to make a confession for his alleged part in the murder of a former soldier, kidnapped and shot dead by the IRA a few months before the bombings.
The Crown has insisted that no armed officers were on duty on the night before he made his alleged statement of admission.
Mr Hill is appealing against the conviction and life sentence for the murder of Brian Shaw, 21.
On the seventh day of the hearing, Mr Kennison, a sergeant with the Surrey constabulary at the time of the investigation, said he was ordered by a senior officer to get a gun. He had just finished his duty at the station but was told to return.
He told the court he knew Mr Hill was in one of the cells, and he was to patrol the cell passage. He looked into the cell to get to know the man's face. 'I saw a man sitting on the bed in the cell. He had his head in his hands and he appeared to be crying or sobbing.'
Later two detectives spent 10 minutes in the cell with Mr Hill before leaving again.
Under cross-examination by Ronnie Appleton QC for the Crown, Mr Kennison admitted his memory had faded but he insisted a chief inspector had ordered him to perform the guard duty.
However, he could not remember the identity of the officer who issued him with the weapon. He signed an entry book to record taking out the weapon, which he carried in a holster around his waist under a jacket.
The former Assistant Chief Constable of Surrey, Christopher Rowe, who was called by the Crown, admitted under cross-examination that there could have been an armed presence in Guildford police station at the time Mr Hill was first in custody.
Mr Hill, he said, had been arrested in Southampton by a detective sergeant authorised to have a weapon to ensure an effective and safe arrest and to make sure there was no escape. Mr Hill was the first suspect to be arrested in what was a major police inquiry.
Under cross-examination by Lord Gifford QC, Mr Rowe then told the court: 'After Hill's arrest, there was likely to have been an armed presence at Guildford police station.'
Arrangements for that presence would have been made by other officers. He added: 'That could have included walking up and down the passage outside Hill's cell.'
Mr Hill has claimed a gun was pointed at him through his cell hatch.
The hearing continues today.