Much has been said about the benefits breastfeeding confers to newborns, from boosting their immune systems to lowering their chances of obesity. But a new study looking into pregnant women who smoke has found an interesting link between their chances of relapse after giving birth and breastfeeding.

Published in the journal Nicotine & Tobacco Research, the study found while women reduced the amount they smoked during their pregnancies, they relapsed to more than half their preconception smoking levels by the nine months after giving birth. Women who breastfed for at least the first three months after giving birth, however, were far less likely to pick up their previous smoking habits.

“Increase in tobacco consumption after the birth of a child may have harmful effects on both the mother and the infant, who is at higher risk of exposure to environmental tobacco smoke,” said Shannon Shisler, from the Research Institute on Addictions at the University at Buffalo, in a press release.

It’s hard to quit smoking outright, even when discovering you’re pregnant, but doing so reduces an array of health risks for both mothers and children. Cigarettes contain over 7,000 chemicals, at least 69 of which are known to cause cancer. Many if not all of these chemicals are harmful, and they pass through the mother’s body to the baby through the placenta and umbilical cord, putting the baby at risk of birth defects, low birthweight, and a host of other health conditions.

But after birth, the child is still at risk of health problems from secondhand smoke exposure, including sudden infant death syndrome (SIDS), lung problems, and, as a recent study found, type 2 diabetes. Keeping smoking to a minimum, at most, benefits everyone involved.

The researchers came upon their results by looking at data on 168 women who smoked during their pregnancy. These women were followed from their first prenatal appointments until nine months after giving birth, and were assessed for factors like breastfeeding, substance use, and whether their partners were also smokers. All of these painted a fuller picture of what might predict smoking habits after giving birth.

“Breastfeeding seems to be a protective factor against increases in smoking after childbirth, so interventions should educate women about breastfeeding to maximize effectiveness,” Shisler said. Supporting women through at least three months of breastfeeding may have long-term benefits in terms of smoking reduction.”

Source: Shisler S, Homish G, Molnar D, Schuetze P, Colder C, Eiden R. Predictors of changes in smoking from 3rd trimester to 9 months postpartum. Nicotine & Tobacco Research. 2015.