A new campaign by state and federal officials to warn motorists about the dangers of driving while high is timely as Massachusetts prepares to make retail sales of marijuana legal next year.

The educational effort includes advertising on billboards, radio and television with the theme “Drive high? The crash is on you.” It comes nine months after Massachusetts voters approved the recreational use of marijuana.

Officials said the media campaign emphasizes that driving while impaired by pot is not just illegal, but also unsafe. In keeping with the goal of reaching younger people, the messages have a humorous edge about the dangers of driving while stoned. One television ad shows a young man repeatedly trying unsuccessfully to light a gas grill that lacks propane. It makes the point that grilling while high is legal, but driving to refill the propane tank is dangerous.

Officials are not trying to “demonize” marijuana use, but rather want to remind motorists that the drug poses the same danger of impairment as alcohol, said Arthur Kinsman, the regional administrator for the National Highway Traffic Safety Board.

“This isn’t a Cheech and Chong movie, where everybody is kind of laughing and driving along and everyone is laid back,” added Kinsman, referring to the comedy duo popular in the 1970s and 1980s.

The campaign is similar to advertising in Colorado after recreational marijuana was legalized there in 2012, targeting motorists who did not recognize the dangers of impairment resulting from the drug’s use.

Drivers high on marijuana are sleepier, have slower reaction times and find it more difficult to estimate time and distance, according to the National Highway Traffic Safety Administration.

Erring on the side of caution when it comes to mixing marijuana and driving is an important reminder to pot users whose self-policing will play a key role in keeping the roads safe.

Law enforcement officials plan to beef up the number of officers with special training to determine whether motorists are under the influence of THC, the chemical in cannabis that triggers a high. However, there still is no reliable scientific measurement for THC impairment similar to breath-alcohol testing devices used to strengthen drunken driving prosecutions.

Furthermore, the Supreme Judicial Court has ruled that the odor of marijuana alone —whether or not it has been smoked — is not legal justification for searching a vehicle.

Col. Richard McKeon, superintendent of the Massachusetts State Police, said there are a total of 141 local and state police officers trained as drug recognition experts, with 60 more to be trained next year.

Still, successful prosecutions are more difficult without an objective, conclusive test for impairment. “We can testify to our observations and we bolster that with our training and our experience and that is how we bring these cases forward,” McKeon said. “But it is a challenge.”

Colorado and Washington were the first states to legalize recreational marijuana in 2012, and six others have since joined them, including Massachusetts and three others whose voters approved ballot initiatives in 2016.

Details about two separate studies conducted in Colorado, Washington and Oregon were announced earlier this year. The results suggest that though there are more accidents in states that have legalized marijuana, there is no evidence of increased fatal crashes.

While representatives of the marijuana industry are cautious about linking cannabis use and the increased likelihood of motor vehicle accidents, they see the wisdom in educating drivers about potential impairment.

Michael Dundas, an attorney who is chief executive of Sage Naturals, a medical marijuana dispensary in Cambridge, was among those promoting the new safety campaign last week. “We urge other dispensaries to join us in partnering with the state to raise awareness about the dangers of smoking and driving,” he said.

It only makes sense to remind Massachusetts residents that while you can get high legally, it’s best not to do so when getting behind the wheel.