A ''belligerent'' clamper placed clamps on two unmarked police cars which were providing security for a visit by the Queen and refused to remove them despite an officer showing his warrant card, a trial heard today.

Gareth Andrews, 39, of Privett Road, Fareham, denies a charge of wilfully obstructing a police constable in the execution of his duty.

Portsmouth Magistrates' Court was told that the Queen had made an unannounced visit to Portsmouth, on Wednesday, May 25.

Colin Shackel, prosecuting, said that Pc Mark Cox and a second officer, both in plain clothes, had parked their unmarked cars at the Gunwharf Quays marina retail complex that the monarch was visiting.

Describing the role of Pc Cox, of Hampshire Police, he said: ''He was actually in effect in a protection capacity, the person being the subject of the protection was Her Majesty The Queen who was due to visit in a private capacity.

''Police have to guard against any potential threat. The intention was for the vehicle driven by Pc Cox to be a contingency force.

''If there was a contingency, it was their role to respond as quickly as possible.''

Mr Shackel said that the parking spaces allocated for the officers were temporarily being used by a delivery lorry so, after consulting security staff, they placed their vehicles in adjacent spaces, the court heard.

Mr Shackel said that one of the police officers had gone to consult colleagues and, while Pc Cox was talking to security staff, two clamping vehicles arrived.

He described how Andrews and his colleagues then clamped the two vehicles, an Audi and a BMW, and he refused to remove them when confronted by Pc Cox.

The court heard that the two cars had been parked for about 15 minutes in the restricted spaces enforced by Shoal Enforcement.

Mr Shackel said: ''It's not just a plain clothes officer speaking to the defendant, there's uniformed security guards from Gunwharf, other officers arrived and identified themselves, even then Mr Andrews said he didn't believe he was dealing with real police officers.

''By the time you have been shown a warrant card and security guards are involved, it would be clear to anyone that it was real officers who weren't just trying to avoid a clamping charge and had duties to perform.''

Pc Cox told the court that Andrews' behaviour was ''belligerent'', ''defiant'' and ''obstructive''.

He added: ''I decided I had no option but to arrest Mr Andrews to get the clamp removed and he was clearly obstructing me.''

Andrews pleaded guilty at the start of the hearing to a second charge of contravening the Private Security Industry Act by not displaying the appropriate licensing badge.

Shoppers at Gunwharf Quays were taken by surprise when word spread that the Queen had arrived at the centre that day and a crowd gathered to greet her.

The Queen had arranged to have lunch with NCP car park boss Sir Donald Gosling on board his yacht, Leander.