A judge has rejected calls for an inquiry into the activities of undercover police officers operating in Scotland.

Tilly Gifford, an environmental activist who claims she was spied upon by such officers, had gone to the Court of Session in Edinburgh to challenge the Scottish Government’s decision not to set up a public inquiry into the matter.

She said afterwards the result was “massively disappointing”.

Labour MSP Neil Findlay, who has repeatedly raised the issue in Holyrood, said he too was “deeply disappointed” with the ruling from Lady Carmichael.

With an inquiry into undercover policing taking place in England and Wales, he added: “How can it be fair that victims of unethical and illegal undercover policing in England and Wales will get access to an inquiry but Scottish Victims won’t?

“This is unjust and wrong.”

Ms Gifford also challenged the decision by the UK Government not to extend its inquiry to include the activities of undercover police in Scotland, arguing the decision breached her right to “private and family life”, as set out in the European Convention on Human Rights (ECHR).

But Lady Carmichael said she had “not demonstrated” either government “acted incompatibly with her Convention rights on this basis”.

Ms Gifford had also argued the decision taken by former justice secretary Michael Matheson not to set up a separate Scottish inquiry was “were irrational, and, separately, disproportionate, and therefore unlawful”.

But the judge ruled: “The decision is one which in my view falls within the range of responses reasonably open to the second respondents, and cannot be categorised as irrational.”

At the time Mr Matheson concluded a separate inquiry into the use of covert police officers in Scotland was “not necessary or justified”.

He made that decision after a review by Her Majesty’s Inspectorate of Constabulary in Scotland (HMICS) had found the use of such officers “can not be considered to be widespread” north of the border – although it stated the Metropolitan Police’s controversial Special Demonstration Squad (SDS) and National Public Order Intelligence Unit (NPOIU) had both deployed officers to Scotland.

The report by HMICS also deemed the use of undercover officers to be a legitimate policing tactic.

It stated: “Operational activity has primarily focused on drug-related offences, child sexual abuse and exploitation, human trafficking and exploitation and serious organised crime.

“There was no evidence that undercover officers from Police Scotland had infiltrated social justice campaigns or that officers had operated outwith the parameters of the authorisation.”

After the legal opinion was published Ms Gifford said: “This is a massively disappointing decision by the Court.

“Our evidence is clear and sound – there has been undercover policing in Scotland, and it needs to be investigated by an independent transparent public inquiry, not just for my sake but for the blacklisted builders, the campaigns, political parties and organisations striving for social justice who have been spied upon.”

A Scottish Government spokesman said: “Ministers welcome Lady Carmichael’s opinion in this case, where the Court has dismissed the petition on all counts.

“The Scottish Government’s decision was reached after full and detailed consideration of this issue and that is reflected in the Court’s judgement.”