Gwen Louden, who has more than two decades of police service, was subjected to a "grossly humiliating" ordeal by her fellow officers after a girl who it was claimed had hurled a McDonalds McFlurry at her alleged victim later said the officer had "coached" her to deny the attack.
Despite the alleged assailant being described as not credible even by her own mother, Ms Louden was twice quizzed by officers, Detective Sergeant Nicola McGovern and Detective Inspector Alistair Waghorn, on the same day in June 2010 at a police station in Forfar.
Although strenuously denying that she had acted inappropriately, Ms Louden was detained in custody, formally cautioned and charged, despite the district procurator fiscal previously advising officers that there would not be sufficient evidence to pursue the case if she did not confess.
Ms McGovern's husband had previously been in a relationship with Ms Louden, 53, who at the time was a community liaison officer based in Muirhead, a small village just outside Dundee.
Although the case was later dropped by the procurator fiscal, Ms Louden, who had her DNA and fingerprints taken, went on to develop anxiety, mental trauma and stress.
She was later diagnosed as suffering from an adjustment disorder with mixed anxiety and depressive reaction, which experts said had been brought on by her arrest.
Sheriff Kevin Veal awarded Ms Louden, who lived at home with her 16-year-old son at the time of her detention, £2,500 for wrongful arrest and a further £1,500 as compensation for the mental anguish she had suffered. The defender in the case was the Chief Constable of Police Scotland.
In a damning judgement at Forfar Sheriff Court, the sheriff said: "I can only - regretfully - observe that the effect of proceeding with the arrest and detention of Mrs Louden at that stage [after she had denied coaching the witness] was to belittle and humiliate her.
"In truth, the arrest and detention of Mrs Louden at that stage was based on information which, at its highest, would not be able to even start to secure a conviction."
Sheriff Veal added that Ms McGovern should never have been the investigating officer in the case, given the former relationship between her now-husband and Ms Louden.
"It is to be hoped that, when it may be deemed necessary to investigate the actings of a police officer, the selection process will not permit a similar situation to arise," he added.
Ms Louden was forced to take months off work as a result of the condition that was caused by her arrest, although she has since recovered and returned to work in January 2011.
Peter Watson, senior partner and head of litigation at Levy & McRae, the firm that represented Ms Louden, said: "This is an historic judgement which underlines the principle that nobody should be arrested or detained unless there is good cause.
"There was no good cause in this case and at least in this case Ms Louden was fortunate enough to have the backing of the Scottish Police Federation."
Ms Louden was also awarded costs and interest following the case. She originally sued Police Scotland for £50,000.
Calum Steele, general secretary of the Scottish Police Federation, said: "We hope the police service learns a very important lesson from this case."