Teenagers who are regular cannabis users by the age of 15 risk "impairing" their educational ability, suggests a study of young people in the UK.
But the study shows occasional use does not seem linked to reduced achievement.
The research is based on a long-term study tracking the health of people born in the Bristol area in the 1990s.
But the study warns it is difficult to distinguish the specific impact of cannabis from other overlapping "risky behaviours" such as drinking alcohol.
"It's hard to know what causes what. Do kids do badly at school because they are smoking weed, or do they smoke weed because they're doing badly? This study suggests it is not as simple as saying cannabis is the problem," says lead researcher Claire Mokrysz, from University College London.
The research, from the Avon Longitudinal Study of Parents and Children, tracked more than 2,000 teenagers to examine links between cannabis use and poorer educational performance.
The research looked at intelligence tests taken by the young people when they were aged eight and then compared the results with tests at the age of 15 and GCSE exams a year later.
It concluded that for occasional users, there is no relationship between cannabis use and a loss in achievement. But for heavier users, youngsters who had used cannabis at least 50 times by the age of 15, there was a link to poorer exam results.
That suggests that adolescents using cannabis once a week were associated with a decline in educational performance.
But the tracking study, also known as Children of the Nineties and using self-reported drug use, shows it is difficult to separate the use of cannabis from other factors in these teenagers' lives.
Young people using cannabis were "associated with decreased intellectual performance".
But these teenagers were also likely to be involved in other types of behaviour, such as drinking alcohol or taking other types of drugs.
Once these other risk factors were taken into account, there was no discernible impact on intelligence from occasional cannabis use.
But for heavy cannabis users, there were slightly poorer exam results at age 16, even when other factors such as alcohol use were taken into account.
The study, launched at the European College of Neuropsychopharmacology annual congress in Berlin, raises questions about public health messages, suggests Ms Mokrysz, from UCL's Clinical Psychopharmacology Unit.
"The belief that cannabis is particularly harmful may detract focus from an awareness of other potentially harmful behaviours," she said.
"People often believe that using cannabis can be very damaging to intellectual ability in the long-term, but it is extremely difficult to separate the direct effects of cannabis from other potential explanations."
She said that a loss of "cognitive performance" could often reflect the lifestyle accompanying cannabis use, rather than the cannabis itself.
The chair of the annual congress, Guy Goodwin, from the University of Oxford, said: "This is a potentially important study because it suggests that the current focus on the alleged harms of cannabis may be obscuring the fact that its use is often correlated with that of other even more freely available drugs and possibly lifestyle factors.
"These may be as or more important than cannabis itself."