State police — expecting a surge in drugged driving now that pot is legal, and looking for a way to prove a driver is high — are finalizing a test of swabs they administered on about 170 people at roadside sobriety checks and a drug treatment center.

The Massachusetts State Police assessment is part of a nationwide effort by police to deal with the lack of chemical tests for drug intoxication comparable to Breathalyzers that are used to measure drunkenness. Legal experts say any chemical test is likely to face challenges in court.

BREAKING: Cambridge man facing charges for cash offer to kill ICE agent

"We’re hoping the technology catches up and, similar to the Breathalyzer, comes up with some way for us to detect if somebody is under the influence of marijuana,” state police Maj. Rick Ball told the Herald yesterday. “The goal is to maintain safe roadways.”

ALSO READ: Editorial: High time for warnings

The cotton swab samples are analyzed to detect the presence of marijuana, methamphetamine and heroin in a driver’s saliva, but that doesn’t tell police how much is in a suspect’s system or how intoxicated that person is.

However, the test would allow police to determine if the person had used drugs and may bolster the case of officers trained as drug recognition experts who assess a person’s level of intoxication and testify in court.

“We hope that it will be an accurate measure of what’s in the system of drivers in Massachusetts,” said Jeff Larson, director of the Highway Safety Division of the Executive Office of Public Safety and Security. “It’s another tool or arrow in our quiver to try to solve that.”

The problem is that THC, the active chemical in marijuana, lasts longer in a person’s system than alcohol and effective ways of measuring a person’s intoxication haven’t been developed.

Attorney Thomas Merrigan of Boston said the state Legislature will need to craft a statute, comparable to the drunken-driving law, for drug intoxication.

“This is no slam-dunk. It has a very long road ahead,” said Merrigan, a former state judge, who said legal challenges are likely. “This is a huge constitutional search-and-seizure issue that needs to also overcome proof of scientific reliability.”

State police conducted the pilot program with Q-tips, swabbing saliva from about 170 people who volunteered to open their mouths along roadside sobriety checkpoints and at an unnamed local drug treatment facility from April 2016 to December 2017, state police spokesman David Procopio said.

Massachusetts State Police and the Massachusetts District Attorneys Association are currently working with the federal National Medical Services labs to summarize the results of their pilot program. Procopio said a final report on the tests is now being drafted. Ball said police want to see whether the saliva tests could be an accurate tool for police to use in dealing with drugged drivers. Similar swab tests are being conducted across the country, including police departments in Colorado, California, Kansas and Michigan.

Meanwhile, state police said they will continue giving roadside drug-intoxication assessments similar to field sobriety tests, but with different prompts, to determine if the driver is on drugs.

The state police have 32 drug recognition experts, or DREs, to respond to drugged-driving incidents, according to Ball, who said there are about 120 others in municipal police departments.

Ball spoke at a “Drive Sober or Get Pulled Over” event staged by the state with companies such as Lyft and Uber yesterday.

“That means over half of the other departments in the state don’t have one,” said Walpole police Chief John Carmichael, who is on the state’s Cannabis Advisory Board. He said, in his department of 44 police officers, there is only one DRE.

“We have to double that number right off the bat,” Carmichael said.

Joe Dwinell contributed to this story.