Police are increasingly aware of covert factories north of the Border making what they call new psychoactive substances - potentially deadly chemicals that mimic cocaine or ecstasy.
The revelation follows the death this week of 19-year-old Helen Henderson, who became ill at a flat in Renfrew after she is believed to have taken the former "legal high" mephedrone, or MCAT.
Scottish gangsters are making their own versions of these products, often labelled "not for human consumption" and described as plant food or bath salts, which were once routinely imported from China or the Netherlands.
Detective Chief Superintendent John Cuddihy, head of organised crime and counter-terrorism at Police Scotland, said: "We are seeing a shift. Organised crime is now involved in the manufacture of these substances here.
"They import the chemical constituents and then seek to manufacture products that mimic cocaine or certain other drugs. In any business, you look to maximise profit and cut out the middle man."
Police and officers at Her Majesty's Revenue and Customs have long taken an interest in the problem of psychoactive substances. Some of these have recently been proscribed. Others, theoretically at least, may have different chemical formulas to those officially banned under the Misuse of Drugs Act.
There have been several high-profile deaths linked to new psychoactive substances.
On Sunday night Ms Henderson was taken to hospital, where she died. Four others were also admitted to hospital from the property, and it is thought they had also taken MCAT.
The Class B drug, which was outlawed in 2010, historically came from China and has been linked to three other deaths in Scotland. Investigations are understood to be ongoing into the domestic industrial production of new psychoactive substances, especially as the import of some of illegal drugs such as MCAT carries severe risks.
Mr Cuddihy said Scottish underworld figures were directly importing ingredients for such products, which are not necessarily illegal, and producing pills or powders at their own factories.
The chemicals are being imported from India, China or the Baltic States, he added. Because they are not controlled drugs, traffickers face being charged with less serious offences under legislation governing the import of medicines.
Some gangsters may believe manufacturing poses fewer risks, because they are importing legal substances, or sourcing them on the Scottish market. However, police are increasingly gathering intelligence about both the products needed to make synthetic drugs and the individuals with the expertise to carry out the work.
Mr Cuddihy said: "They will seek to use professionals, all the way down to a fourth-year chemistry student who can think of new ways of mimicking an illegal drug. They may think it is a 'legal' high and as such it is legal to involve themselves in it. But where does it say that it is legal to cause the death of another individual? Or a near-miss that puts a child in hospital because they consume something wrongly called a 'legal high'?"
Police believe the gangsters would be responsible for the death or injury of anyone who deliberately or inadvertently takes the substances. A number of crime groups have sought to "smother" their manufacturing activity using front businesses.
Mr Cuddihy added: "We are certainly seeing a number of organised crime groups diversifying into this. They are manufacturing wherever they can find a facility to host it, wherever they can covertly carry out business. They need somewhere where they can hide their nefarious business from others, where they can bring in bulk ingredients."
Assistant Chief Constable Ruaraidh Nicolson added: "The danger of these new psychoactive substances is that nobody really knows what is in them. People don't know what they are taking."
Detective Sergeant Michael Miller of the STOP Unit has warned officers face a constant battle against new drugs and toxic variations of known illegal substances.