A man who picked up a policeman’s hat after it was knocked off in a disturbance then gave it back was prosecuted for having the headgear.
John Boyd, 21, retrieved the item and stayed at the scene while officers dealt with a scuffle outside a nightclub in Ayr.
But when he returned it to a constable, instead of being thanked he was issued with a fixed penalty for possessing the hat without authority.
Mr Boyd was accused under the Police and Fire Reform Act with possessing an article of police uniform without being a constable nor with permission from the Scottish Police Authority.
He refused to pay the £75 ticket and took his case to Ayr Justice of the Peace Court, where he was found not guilty.
Three policemen were called to give evidence into the events in Ayr’s Arthur Street in February 2016.
Two officers said they later saw the peak of the hat sticking out of Mr Boyd’s coat. They claimed he handed it over after being warned he would be searched, although this was not in their original statements.
Colin Adam, defence solicitor said Mr Boyd had been “merely holding” the hat for a matter of minutes while the officers were busy, gave it back when asked and had not been in unlawful possession of it.
JP Alec Russell ruled there was “reasonable doubt” in the case last Tuesday and found Mr Boyd not guilty.
Mr Boyd declined to comment at his home in Monkton, Ayrshire.
A spokeswoman for the Crown Office said: “We note the decision of the court.”