Research has shown that cannabis use by young teenagers can lower their intelligence and may cause permanent mental impairment.
Researchers from Britain and the US found that persistent and dependent use of cannabis before the age of 18 may have a so-called neurotoxic effect, but heavy use after 18 appears to be less damaging to the brain.
The most persistent users suffer an average eight-point decline in IQ between adolescence and adulthood, according to the study of more than 1,000 participants.
Scientists believe smoking cannabis from the age of puberty may disrupt developing and vulnerable brain circuits.
The study, which was published in the Proceedings of the National Academy of Sciences, revealed that users experienced significantly more attention and memory problems than non-users.
Quitting or cutting down on cannabis use later in life did not fully reverse the impact on those who started taking the drug in their early teens.
The study found no evidence of similar problems affecting people who only took up cannabis as adults.
Professor Terrie Moffitt at King's College London's Institute of Psychiatry said the scope and length of the study gave its findings added weight.
Prof Moffitt worked with Madeline Meier, a post-doctoral researcher at Duke University, to analyse data on 1,037 New Zealanders who took part in the study.
About 96% of the original participants stuck with the study from 1972 to today, she said.
At age 38, all participants were given a battery of psychological tests to assess their memory, processing speed, reasoning and visual processing.
Those who had used cannabis persistently as teens scored significantly worse in most of the tests.
Friends and relatives regularly interviewed as part of the study were more likely to report that the heavy cannabis users had attention and memory problems, such as losing focus and forgetting to do tasks.
Previous research on cannabis use has also pointed to potential long-term psychiatric effects.
A study published in March last year found that people who use it a lot in their youth dramatically increase their risk of psychotic symptoms.
It also found that continued use of the drug can increase the risk of developing a psychotic disorder.