The officer, a former detective constable who served with Surrey Constabulary for 19 years, said that he was disgusted with the incident but had not reported it to his superiors.
Paul Hill, a member of the Guildford Four, is appealing against his conviction in 1975 for the murder of a former soldier, Brian Shaw, in
Belfast. He attended court yesterday with his wife, Courtney Kennedy, and other members of the Kennedy family.
At his original trial, Hill admitted signing a statement confessing to the murder, but claimed that he did so after he had been ill-treated in Guildford police station, including an incident when a gun was poked through the hatch of his cell. Surrey police have always denied that such an event took place.
The former officer, who was referred to as Witness B, told the Northern Ireland Court of Appeal that he and another officer, PC Gerry Queen, who the court heard was still serving with Surrey police, although now as an inspector, had been on duty as firearms officers while Hill was held at Guildford police station.
He said: 'I heard the click of the hammer falling on the chamber of a gun, and I saw that that was coming from the hands of the officer, who was standing in front of a cell with his gun pointed into the hatch.'
He added: 'He turned and he looked at me with an expression that was peculiar to him - it was sort of a leer across his face.' The former officer said he had not reported the incident as it would have been a thankless task because of the pressure and the emotive atmosphere at the time. He added that it would also probably not have helped his career.
He described the officer concerned as a prat, a loner and an oddball with a macabre sense of humour. He said that at other times, when they had been on duty together at Gatwick airport, the officer had on several occasions crept up on him and other policemen and appeared suddenly from behind pillars with his revolver drawn.
The former officer said he had later been with a group of other officers when the policeman involved had boasted of the incident at the cell. He did not know who, if anyone, had been in the cell when it happened.
The hearing was adjourned until today.