Police will use roadside drug testing kits when a more stringent law against drug driving comes into force.
The legislation introduces a near-zero limit for drugs most associated with illegal use, including cocaine, cannabis, ketamine, LSD, meth, ecstasy and heroin.
The limits are not zero to allow for minor accidental exposure to such drugs.
Several drugs with medical uses will have limits based on impairment, including clonazepam, diazepam, flunitrazepam, lorazepam, methadone, morphine, oxazepam and temazepam.
Police will use mouth swabs to test drivers suspected of drug driving or who have been in an accident or stopped for a traffic offence.
Currently, it is illegal to be in charge of a motor vehicle while unfit through drugs with the penalties - a minimum 12-month driving ban, up to six months in prison and a fine of up to £5,000 - reserved to Westminster.
READ MORE: 'Shocking' report from torture committee says disturbed women in Scottish jail need hospital not prison
The new drug limits, which are devolved, will remove the need to prove impairment and come into force on October 21.
The new legislation will operate alongside the existing law and carry the same penalties.
People taking medication as prescribed can claim a medical defence against the new legislation, but can still be prosecuted under the impairment offence if the prescription indicates that they should not drive while taking the medication.
Police Scotland head of road policing, Chief Superintendent Stewart Carle, said: "With our partners, we are committed to reducing road casualties and deplore the devastating consequences of drug driving on victims, their families and communities.
"This new legislation gives the police powers to detect, at the roadside, those selfish motorists who risk the lives of others and themselves by driving after taking illegal substances.
"Over and above our priorities for road safety, there will be wider benefits for improved public safety as these powers and new equipment will help us disrupt illegal drugs supply by dealers, and organised crime groups by deterring and detecting drug drivers."
Justice Secretary Humza Yousaf praised the work undertaken to prepare for the new legislation.
He said: "Driving a vehicle while under the influence of drugs is simply not acceptable. The consequences of causing a collision while under the influence can be devastating.
"I am grateful to Police Scotland, the Scottish Police Authority, and the Crown Office and Procurator Fiscal Service for their hard work to prepare for the new laws coming into force.
"Alongside our stringent drink driving limits, these new curbs will ensure Scotland's law enforcement agencies have the most robust powers in the UK to tackle impaired and unsafe driving in order to keep people safe."
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules here