Listening devices concealed in briefcases are among James Bond-style spying gadgets being used by council snoopers across the north and north-east.
Figures obtained by the Press and Journal show senior officials authorised dozens of undercover operations in recent years.
Aberdeen City Council used the “Matron” system to gather evidence against a “noisy neighbour” blasting out loud music.
Its Danish manufacturer says it is carried in a standard briefcase “to avoid arousing suspicions from interested observers” when it is installed in a next-door property.
Critics say powers to carry out covert surveillance were only meant to be used to trap terrorists and serious criminals.
But hidden cameras, fake shoppers, bogus social media accounts and other techniques are being used regularly to investigate people suspected of more minor offences such as abusing disabled parking or breaching tenancy agreements.
Trading standards chiefs defended the practice – insisting it is tightly controlled and has led to a number of high-profile prosecutions.
Responses to Freedom of Information requests show permission was granted to spy at least 156 times over five years under the Regulation of Investigatory Powers Scotland Act (Ripsa) by four councils: Aberdeen City (24), Aberdeenshire (41), Moray (58) and Highland (33).
Residents of both Orkney and Shetland have not been the subject of any Ripsa-based operations over the period, their councils said.
The most common use was by trading standards officials tracking illicit cigarettes and shops selling tobacco to children – though one Aberdeen sting had to be abandoned because the outlet concerned was robbed.
Drivers abusing Blue Badge disabled parking permits – including those belonging to dead people – were also common with vandalism, fraud, the theft of council property, unlicensed fireworks and anti-social behaviour among other reasons given.
The legislation allows councils to approve surveillance and undercover operations to detect crime, prevent disorder and in the interests of public safety or protecting public health – but rules out “intrusive” snooping in suspects’ homes or cars.
Peter Adamson, trading standards manager at Moray Council, said the powers were increasingly focused on monitoring and shutting down online traders selling counterfeit and dangerous goods.
In April, one such operation led to a woman being ordered by a court to serve 165 hours of community service after being caught with £40,000 worth of fake branded clothing. Another ended with a dodgy dealer being fined £1,350 and slapped with an £8,300 confiscation order.
Officials were now focused on cases “that cause the most damage to consumers and legitimate businesses” rather than routine inspections, Mr Adamson said.
“The whole process is very, very tightly regulated. We have to show that what we are proposing is proportionate and necessary – that there is no other way of doing it.”
A spokeswoman for Aberdeenshire Council – whose use of the powers has slowed considerably in the last three years – said that among its cases had been a probe into the supply of potentially health-threatening diet pills.
She said: “The use of the legislation in these examples and the others cases referenced is legitimate and exactly the kind of thing council resources should be used for.
“If there is a need to use the legislation, we will not hesitate to do so proportionately to protect our communities.”
An Aberdeen City Council spokeswoman said: “In accordance with government legislation, Aberdeen City Council uses such investigatory powers where appropriate to protect public safety.”
A watchdog has raised concerns that a slowdown in the use of the powers as councils struggle with squeezed budgets could lead to lapses in the training of authorising officers – putting civil liberties at risk.
The annual report of the Office of Surveillance Commissioners suggested smaller authorities may need to be stripped of the right to authorise covert operations if the trend continued.