A judge who slammed the failed prosecution of a West Yorkshire police officer as "a politically correct disgrace" has now formally ruled that bringing the case to court was "unreasonable."

PC Lee Armstrong, who lives in Ilkley, was accused of using excessive force while arresting a knife-carrying man outside a shop in Keighley in December, 2005.

But when his trial began at Bradford Crown Court two months ago, prosecutors decided not to offer any evidence, prompting Judge Jonathan Durham Hall QC to issue a stinging rebuke.

He said the prosecution of "yet another man doing his duty, for reasons that are best described as politically correct, is a disgrace."

Dismissing the assault charge against the 28-year-old officer, the judge told him: "I cannot imagine what you have felt being pursued and harassed in this prosecution over the last few months and I am very sorry.

"Thank you. Leave without a stain on your character."

He praised PC Armstrong for his bravery and ordered that his defence costs - estimated at around £16,000 - should be paid by the Crown.

That order was confirmed in the same court today, despite claims that the Crown Prosecution Service had acted correctly in bringing the case to court.

Paul O'Shea, for the Crown, said the CPS took the decision to prosecute on the basis of the evidence it had at the time, knowing it was a difficult and sensitive case.

But the situation had "completely altered" by the time the trial was due to start, he added.

Mr O'Shea pointed out that prosecutors had to work to a written code which specified the issues that had to be taken into consideration, including the public interest and the reasonable likelihood of a conviction.

Judge Durham Hall described the code as "a very lightweight document" which deserved reappraisal, and said there was perhaps a need for prosecutors to be given rather greater assistance "in the complaining culture in which we live".

He said PC Armstrong had acted "effectively, swiftly and indeed robustly" when confronted by a knife-weilding man, whose first response on arriving at the police station was to make a complaint against the officer.

The judge said he found it "remarkable and utterly inexplicable" that the arrested man was not prosecuted.

Bearing in mind the information provided by a witness in the case, the fact that PC Armstrong was unarmed and dealing with a knife-carrying man and being abused by bystanders, there was no prospect of him being convicted "objectively, subjectively or otherwise," said the judge.

He added it was rare to make what is known as a wasted costs order, but in this case the actions taken by the prosecuting authority against PC Armstrong were "simply unreasonable."