Women who smoke are at high risk for developing a condition known as peripheral artery disease (PAD), which causes reduced blood flow to the legs, a new study shows. Quitting smoking greatly reduces—but does not eliminate—the risk of PAD.

PAD’s main symptom is leg pain during normal activities such as walking. According to the American Heart Association, untreated PAD can lead to loss of a leg, and increased risk for heart attack and stroke.

The study included 39,825 women with no cardiovascular disease at the start of the study. They were followed for about 13 years. Female smokers were up to 17 times more likely than women who didn’t smoke to develop PAD. Former smokers were three times as likely as women who had never smoked to develop PAD, the researchers report in the Annals of Internal Medicine.

“Our most important finding, in my view, is that smoking cessation substantially reduces this risk,” lead researcher Dr. David Conen, of the University Hospital Basel in Switzerland, told Reuters.