Motorists suspected of driving after taking illegal drugs are set to be given roadside breathalyser-style tests for the first time in Britain.

North Yorkshire Police are testing a machine which can detect tiny amounts of drugs such as cannabis, amphetamines, cocaine, heroin and other drugs from samples of saliva.

The force said the tests, which will not form the basis of any prosecution until new legislation is introduced, would follow the current field impairment assessments, which involve drivers attempting to walk in a straight line and checks on the size of their pupils.

Suspects will be asked to move a collecting device between their cheeks and gums for one to four minutes to produce saliva to be analysed by a portable Drager DrugTest 5000 machine.

A spokeswoman for Drager said the system was being used by police in a number of European countries, including Germany. She said: “Misinterpretations of the results are impossible. The final results are clearly visible, indicating either positive or negative for each drug class.”

The trial, which is part of the force’s festive road safety campaign, follows the Government proposing a new offence of driving with a specific drug in the body, above a certain limit, to bring it into line with the drink-driving offence.

A force spokesman said it was hoped the trial would illustrate how easy it would be to use the system.

He said: “We stop a lot more drink-drivers than drug-drivers and with this system, alongside new legislation, there could be a significant change in the number of drug-drivers caught and successfully prosecuted.”

The proposed legislation was triggered by a review in 2010 by Sir Peter North which estimated there were 200 drug driving-related deaths a year nationwide.

In 2011, there were 52,000 prosecutions brought in magistrates’ courts for drink-driving and less than 2,700 prosecutions for driving while impaired through drink or drugs, and 41 per cent of the latter charges were withdrawn or dismissed.

Ministers said the legislation would remove the difficulty of proving a driver was impaired by drugs, reducing wasted time, expense and effort for the police and courts when prosecutions failed.

It is understood the legislation will allow drivers with tiny amounts of drugs in their systems to drive, to avoid inadvertently criminalising patients, or people who have traces of drugs in their bloodstream through accidental exposure.