A detective at the centre of the row over unlawful spying on journalists’ sources has made a formal complaint about her superior.

Brenda Smith, who raised concerns about the unethical snooping, has alleged that Chief Superintendent Ricky Mason isolated her at work and treated her differently to male colleagues.

Part of the misconduct complaint about Mason, who as Head of Intelligence Support holds one of the most sensitive jobs in Police Scotland, is said to relate to the aftermath of the spying row.

Police Scotland has been in turmoil for six months after its Counter Corruption Unit used surveillance powers in April to snoop on suspected journalists’ sources.

The CCU used the Regulation of Investigatory Powers Act to find out if retired and serving officers had provided a newspaper with information for stories relating to a botched murder probe.

However, the force failed to get judicial approval for the spying operation – a clear breach of the code of practice setting out the rules.

The Herald:

Picture: the Sunday Herald's original story

The individuals affected may now seek compensation from the Investigatory Powers Tribunal and Holyrood’s Justice Committee has held hearings into the scandal.

MSPs have tried to call four officers who had knowledge of the RIPA process in this case: Detective Superintendent David Donaldson; Detective Inspector Joanne Grant; Chief Superintendent Clark Cuzen; and Detective Superintendent Brenda Smith. The four have declined to appear front of MSPs.

However, MSPs established in another committee session that Smith cautioned against using the RIPA to uncover journalists’ sources.

Asked by an MSP if the “senior responsible officer” – Smith - expressed concerns about using the spy powers in this particular case, assistant chief constable Ruaraidh Nicolson said: “In more general terms, she expressed concern about applications for journalistic material.”

It has now emerged that Smith, who policing sources says is highly regarded throughout the UK for her knowledge of RIPA, complained months ago about Mason.

It is understood the investigation, which has sent shock waves throughout the force, is being headed by ACC Malcolm Graham.

The complaint has over 20 elements and is believed to relate to alleged conduct going back to 2014, but also concerns her treatment after the CCU breached the spying rules in April.

Insiders say Smith has alleged that she has been frozen out by Mason and not been shown respect.

She has also alleged that Mason discussed stripping her of an important part of her job and claimed male colleagues were treated better.

Crucially, she has alleged that her isolation was a factor behind the force’s failure to comply with the codes of practice.

It is understood former and serving officers will be interviewed as part of the process, as will figures in the Scottish Government.

In a letter to MSPs last month, Smith declined the opportunity of appearing in front of the Committee, but offered assistance: “Due to a prior commitment on 2 February 2016, I am unable to attend the Justice Committee. I therefore respectfully decline your invitation at this time. That said, I am willing to co-operate with the Committee to clarify any aspect of the timeline should you continue to consider it competent.”

Mason came from the now defunct Strathclyde Police and was one of the officers credited in 2005 as having uncovered new leads in the Bible John murders.

At Police Scotland, he has the crucial role of managing intelligence and information which support national policing operations.

The spying breaches, revealed by the Sunday Herald in August, have had ramifications at the very top of the force.

Stephen House is believed to have brought forward his retirement date as a result of the row, while Richardson’s bid to become chief constable was harmed by having portfolio responsibility for the CCU.

John Finnie MSP, who used to be a police officer, said: "Anyone familiar with how Police Scotland have conducted themselves in recent weeks will not be surprised at a detailed complaint of this nature.

"Sadly, bullying remains a problem in the Police Service and the public have already drawn their own conclusions about certain senior officers’ prevarication at the Justice Committee and their unwillingness to allow subordinates to speak in public.”

"ACC Graham is a man of integrity whom I'm sure will get to the bottom of these very serious accusations.

"It's in everyone's interests that this enquiry is conducted as soon as possible and the findings made public."

The Herald: John Finnie

Picture: John Finnie MSP

Labour MSP Graeme Pearson, former Director General of the Scottish Crime and Drug Enforcement Agency, said: “This is symbolic of the way Police Scotland failed to grasp the RIPA issue at the earliest opportunity and resolve it. Had there been more candour at the outset, we would not be in this situation. There has been a deep-seated desire to whitewash the RIPA issue, rather than simply deal with it. This complaint is indicative of a rudderless ship.

A Police Scotland spokesperson said: “We can confirm a complaint is being investigated and it would clearly be inappropriate to comment further.” The force added that neither Smith nor Mason wished to make any comment.