Marijuana use inhibits young people from performing certain driving-related tasks for several hours, a new Canadian study has found.

The study involved testing the driving abilities of 45 recreational marijuana users in a simulator before they consumed marijuana, then testing them again one, three and five hours after consumption. All of the participants were between the ages of 18 and 24.

Researchers at McGill University found that cannabis use made no difference when it came to simple driving actions such as braking, steering and maintaining a steady speed.

When the tasks became more difficult, such as being asked to spot multiple potential hazards on the road, the drivers showed what the researchers described as “significant impairment” after cannabis consumption.

“Performance was almost always significantly better without cannabis,” the study reads.

The drivers also seemed to understand, on their own, that marijuana use hindered their abilities, as they were asked at each stage about their perceptions of their safety. Many reported feeling significantly less safe and less capable behind the wheel after consuming cannabis than beforehand. This jibes with earlier research which shows that drivers become more cautious on the road after using cannabis.

Research subjects did appear more confident in their driving ability as time progressed after using marijuana. Forty-three of the 45 people said they felt less safe than usual driving one hour after consumption. Three of those 43 no longer felt that way after three hours, and four more said their perception was back to normal after five hours.

Previous studies have shown that cannabis use can slow drivers’ reaction times and make it harder for them to focus.

The McGill study was funded by the Canadian Automobile Association. It has been published in the Canadian Medical Association Journal. It focused on young drivers because they are considered the most likely age group to use marijuana and to be at high risk of being involved in car crashes in general.

Drivers concerned about other motorists potentially being high should focus on defensive driving skills, CAA chief strategy officer Jeff Walker told CTV News Channel on Monday.

“The best advice I can give is to make sure that we’re always driving safely. That’s the best path,” he said.

Recreational possession and use of cannabis will be legalized in Canada on Wednesday, although rules on having the drug in a vehicle vary from province to province. Driving while impaired by marijuana will remain illegal.

The Centre for Addiction and Mental Health recommends that cannabis users wait at least six hours after consumption before getting behind the wheel of a vehicle.

A survey commissioned by CAA and released earlier this month found that 1.9 million Ontario motorists reported driving while under the influence of cannabis.