NICOLA Sturgeon has written to David Cameron demanding to know if government agents are spying on MSPs following a rule change.

Internal documents reveal GCHQ, the agency responsible for surveillance, is no longer applying the Wilson doctrine to members of the Scottish Parliament.

The rule, named after former prime minister Harold Wilson, had been used to protect UK politicians from having their calls and emails intercepted.

Although it was never formally extended to cover devolved assemblies in Scotland, Wales and Northern Ireland, it was unofficially applied to their members.

However, documents show that protection has not been afforded to “communications of Members of the European Parliament or devolved assemblies” since March.

Yesterday, the First Minister wrote to Cameron calling for “urgent responses” on the matter and asking him to treat MSPs in the same way as MPs.

She wrote: “I am sure you will agree with me that, excepting truly exceptional circumstances involving national security, the confidentiality of communications between parliamentarians and their constituents is of the utmost importance.

“I am sure you will also agree that it is just as important for MSPs as it is for MPs. This principle of confidentiality is what the ‘Wilson doctrine’ was introduced to protect. The Scottish Government has not been consulted on any such matter.”

The letter asks Cameron: “Are these reports correct in stating that there has been a change of policy and that GCHQ has ceased to apply the Wilson doctrine to the communications of MSPs?

“If so, why was this decision taken, when and by whom was it taken, and was there any ministerial knowledge or approval?

“Has there in fact been any interception of MSP communications?

“Will you give an immediate assurance that this policy change by GCHQ will be reversed and that the Wilson doctrine will again be applied to MSP communications, and indeed to the communications of other devolved Parliamentarians and Assembly members?

“Will you give an assurance that, with respect to the Wilson doctrine, MSPs will in future be treated equally to MPs by all of the intelligence agencies?”

The letter has been copied to Scottish Secretary David Mundell and Presiding Officer Tricia Marwick.

The Green Party’s Caroline Lucas and Lady Jones are currently pursuing a legal case, claiming disclosures made by whistleblower Edward Snowden prove GCHQ intercepted their communications, contravening the Wilson doctrine.

In 2013, independent MSP Margo MacDonald asked the head of M15 for assurance that security services would not be involved in the Scottish referendum campaign. The late MSP said she believed UK security services infiltrated the Yes campaign, but the content of the response she received on the matter is unknown.

In her own letter to the prime minister, Marwick wrote: “As Presiding Officer I am responsible for safeguarding the interests of all members of the Scottish Parliament and I would therefore seek your urgent clarification on what guidelines exist in relation to members of the Scottish Parliament and whether there has been any change in the approach of the security services.

“I would expect the Scottish Parliament to be consulted if any change is being proposed.”

Meanwhile, the Scottish Greens are calling for the Home Secretary to be brought to Holyrood to give evidence on the issue.

Co-convener Patrick Harvie said: “The revelation that the UK intelligence services have changed their guidelines to allow spying on MSPs’ communications is deeply disturbing and we must have a statement from ministers explaining the change. The privacy of parliamentary communications is a vital tool to protect the public interest.

“My colleague John Finnie MSP intends to write to the convener of Holyrood’s justice committee, suggesting that the Home Secretary is called to give evidence about the situation. Our digital age is an exciting time but there is clearly a need for stronger limits on surveillance by the state.”

Labour MP Ian Murray has also tabled a series of Parliamentary questions in the House of Commons in response to the “outrageous” report.

However, referring to Scottish Government plans to appoint a named person for every child in Scotland, Tory MSP Murdo Fraser said: “Given the SNP devised the state guardian scheme and wants to meddle in people’s lives to ludicrous extents, you’d think the party would welcome these reports.

“Perhaps the Nationalists should think of this as being given a little named person of their own.”