Smoking marijuana doesn’t appear to do the kind of damage to people’s lungs as smoking tobacco does, research published Tuesday afternoon in the Journal of the American Medical Association finds. But that may have to do more with the way marijuana is typically smoked than with anything inherent in the substance itself.

Researchers at University of California-San Francisco and University of Alabama at Birmingham gleaned 20 years’ worth of data for more than 5,000 people ages 18 to 30 (when the data was first collected) from a database that included information about participants’ tobacco and marijuana smoking. The data also included measurements of participants’ lung capacity, specifically forced expiratory volume (FEV, which measures the volume of air the lungs can hold) and forced vital capacity (FVC, or the speed at which a person can blow air out) at several points during those 20 years.

The authors’ interest in the potential lung-health effects of marijuana smoking (they didn’t look at other means of consuming the substance, such as ingesting it) stems in part from marijuana’s increasing medical use. The study notes that marijuana smoke is known to contain many of the same compounds as tobacco smoke, so it’s important to determine whether it causes similar damage to the lungs.

Their analysis confirmed that tobacco smoking reduced lung capacity according to both measures, and that the more people smoked tobacco, the greater their loss of those functions.

But regular use of marijuana actually appeared to improve lung capacity, with moderate use associated with improvements in both FVC and FEV. The authors note that very heavy marijuana use is likely tied to decreased lung capacity, though too few study participants were heavy users of marijuana but non-users of tobacco to make that connection clear. Still, the authors point out that the moderate use of marijuana reflected in their data is consistent with the way people tend to use that substance; smoking just a few joints per week, with use typically starting and peaking in youth and young adulthood and tapering off with age. In contrast, tobacco smokers tend to smoke many cigarettes per day and to stick with the practice for many years.

The authors speculate that aspects of the way marijuana users inhale -- drawing the smoke deep into their lungs and expanding their chest walls to accommodate those deep inhales -- may actually strengthen lungs and increase their capacity.