Jim Wilson/The New York Times

A large new government study has found that smoking marijuana on a regular basis, even over several years, does not impair lung function.

Marijuana, the country’s most widely used illicit drug, has become increasingly popular and less stigmatized in recent years, particularly among young adults. One government report released in December found that one out of 15 high school students now smokes marijuana nearly every day, a growth fueled in part by the spread of medicinal marijuana, which is legal in 16 states. With its use rising, questions about the drug’s long-term medical consequences have garnered more attention.

The new research is one of the most extensive looks to date at whether long-term marijuana use causes pulmonary damage, and specifically whether its impact on the lungs is as harmful as smoking cigarettes. The researchers followed more than 5,000 people over two decades and found that regularly smoking marijuana — the equivalent of up to a joint a day over seven years — did not impair performance on a lung function test. The test, a measure of pulmonary obstruction that looks at the amount of air a person can force out in one second after taking a deep breath, is typically worsened by smoking tobacco.

In something of a twist, the researchers found that compared to nonsmokers, marijuana users performed slightly better on the lung function test, though the improvement was minuscule. “Even with this tiny increase in airflow, I have to admit that I really doubt that there’s any real increase in lung health,” said Dr. Stefan Kertesz, an associate professor at the University of Alabama at Birmingham school of medicine and an author of the study. The finding may merely reflect marijuana smokers’ years of “training” in taking deep inhalations and holding the smoke, the researchers said.

In the near term, smoking marijuana irritates the airways and can cause coughing, and public health advocates stress that it causes impairment that reduces attention, lowers motivation and heightens the risk of accidents. Over days or weeks, chronic use can lead to problems with learning and memory. But whether smoking marijuana sets off the type of pulmonary changes that lead to lasting damage like chronic obstructive pulmonary disease, a leading cause of death among Americans, was not entirely clear.

Earlier research suggested that the impact of marijuana smoke, which contains some of the same noxious chemicals as tobacco, was not as harmful to lung function as cigarette smoke. But many of the studies were carried out over relatively short periods and contained hundreds, not thousands, of subjects.

In the new study, which was published in The Journal of the American Medical Association and financed by the National Institutes of Health, roughly 5,100 men and women in four cities – Oakland, Calif.; Chicago; Minneapolis; and Birmingham – were interviewed and given lung function tests repeatedly over 20 years. They were on average about age 25 at the start, and more than half smoked marijuana, cigarettes or both.

The researchers found that for moderate marijuana smokers, an exposure of up to seven “joint years” — with one joint-year equivalent to smoking 365 joints or filled pipes, or an average of one joint a day for seven years — did not worsen pulmonary function. Dr. Kertesz noted that with heavier marijuana use, described as 10 joint-years of exposure or more, lung function did begin to decline. And for a person who smokes both marijuana and cigarettes, “the net effect is going to be continued loss of lung function.”

Dr. Donald Tashkin, a pulmonologist at the University of California, Los Angeles, who has studied marijuana for over 30 years and was not involved in the study, said it confirmed findings from several other studies showing “that essentially there is no significant relationship between marijuana exposure and impairment in lung function.” He said one reason marijuana smoke may not be as harmful as tobacco smoke, despite containing similar noxious ingredients, may be the fact that its active ingredient, THC, has anti-inflammatory effects.

“We don’t know for sure,” he said, “but a very reasonable possibility is that THC may actually interfere with the development of chronic obstructive pulmonary disease.”

Dr. Tashkin said he and his colleagues had found in their own research — unexpectedly — that even smoking up to three joints a day did not appear to cause a decrease in lung function. “I think that the bottom line is that there does not appear to be any negative impact on lung function of marijuana smoking,” he said, “and that therefore marijuana is not a risk factor for the development of C.O.P.D. Tobacco smoking is the most important risk factor for C.O.P.D.”

Correction: A headline on an earlier version of this post did not reflect the researchers’ findings that lung function was compromised after 10 or more joint-years of exposure.