A former undercover police officer who was suspended after she expressed fears a colleague had compromised cover operations has won a court action.

The woman, who joined Grampian police in 1990, brought a Court of Session damages claim for £1m insisting she was badly treated in being disciplined by the force, when she was a whistleblower.

The court heard that she suffered psychiatric illness and loss of earnings as a result of suspension from employment.

Lord Brailsford found in her favour on the issue of liability after she raised an action against former Police Scotland Chief Constable Sir Stephen House.

He said: "I am satisfied that there is a causal link between the breach complained of and the injury of a psychological or psychiatric nature sustained by the pursuer."

Police Scotland noted the court decision and was considering the terms of the judgment.

The court heard the officer, known only as Mrs K was left feeling as if she had done wrong.

Lord Brailsford's judgment said a further decision would have to be made about the compensation she is due.The Herald: Judge gavel and scale in court. Library with lot of books in background.

She raised the alert about compromised operations after she went to a covert mail box operated by a fellow detective sergeant known only as DSG and found unopened mail containing bank statements and phone bills in names she had never previously heard.

She later went to a unit she had used as an office and it had been ransacked and evidence had been shredded.

The woman later said another officer had asked that further documentation should be burned.

An internal investigation was launched and as part of it the woman was quizzed for two and a half days which she said left her feeling "degraded".

Later she was suspended as an undercover operative and she said she could not understand why.

The judge said DSG accepted responsibility and indicated the woman officer had not been involved.

He said: "There was no doubt in the mind of the pursuer that all senior management within Scottish Crime and Drug Enforcement Agency (SCDEA) including the head of the intelligence department, Chief Superintendent Stephen Whitelock, regarded the situation which had been uncovered as extremely serious and to constitute a significant risk of compromising the work of the units.

He added:"She further stated that her distress was a reaction to being informed by police colleagues that she was part of a process in which SCDEA were effectively using her as a scapegoat and that the outcome of the investigation would be the termination of her career."

Mrs K said she was later transferred to work in a witness protection unit and was told it was a temporary move.

Lord Brailsford said she was "deliberately misled".

"A decision was taken by Ch Supt Whitelock that the pursuer should not, after discovery of the events in relation to DSG's mismanagement, ever work in SOU (special operations unit) again.

"That decision was taken apparently without consultation with any other person."

He said the decision was not subjected to "objective evaluation or scrutiny" and added: "These considerations would, of themselves, in my view constitute a lack of fair treatment in the context of an employee-employer relationship."

The officer brought the action against the chief constable claiming it was the force's duty to treat her fairly in carrying out an investigation.

BTO Solicitors said: "This is the best possible outcome for a valued client who displayed great courage throughout proceedings.

"Our client was a very committed and loyal undercover officer who sadly had her successful career cut short.

"The court has recognised the lack of fair treatment afforded to her and the resultant devastating impact which this has had on her both professionally and personally.

"We now move on to the next stage of this litigation and have no further comment to make."

A Police Scotland spokesman said: "We note the decision of the court and are now considering the terms of the judgment."