Women who have struggled with their weight through their lives are much more likely to go through menopause before they turn 45, according to a new study.

It applies to women who are underweight, have previously been underweight or who have had dramatic losses in weight a few times. A study in the journal Human Reproduction says the people in these groups have a heightened risk of naturally going through menopause earlier in life as compared to those in other weight groups. Overall, underweight women were 30 percent more likely to go through early menopause than lean or normal-weight women.

That’s based on information collected from almost 80,000 women, who were being followed from young adulthood into their menopause years. The researchers also gathered information about the women’s teen years, before the study began.

Those teenage years were important, as they were found to have an effect on early menopause risk. According to the study, the women who were underweight during their early adulthood as well as their mid-adulthood were all at a higher risk than women who were lean or in a normal weight range.

Overweight women, on the flip side, appeared to have a lower risk for early menopause.

Those who would fit into the underweight category could be women who are naturally thin or those who have an eating disorder like anorexia.

While early menopause could be a problem for women in a society where more people are waiting longer to have children, there are negatives to early menopause that are not related to fertility. As the researchers note, other studies have found connections between early menopause and cardiovascular disease and osteoporosis, among other issues.

“Though genetic factors partially account for increased risk of early menopause, modifiable lifestyle, reproductive and environmental risk factors may also play a role,” the scientists wrote in this study.

But previous research into a possible link between weight and menopause has not been conclusive.

The new study shows an association between the two. Women in the group who had lost at least 20 pounds a few times between ages 18 and 35, what the researchers called “severe weight cycling,” were more likely to begin menopause early.

There are also other factors that influence the age of menopause, including the number of eggs in a woman’s ovaries — something that has a genetic basis.

“These findings have important implications for women and their doctors,” lead researcher Dr. Kathleen Szegda said in a statement from the European Society of Human Reproduction and Embryology. “Underweight women may want to consider discussing the potential implications of these findings with their doctors.”

About 3.5 percent of the women in the study pool went through early menopause.

It’s still unclear how exactly being underweight may be connected to early menopause, although sudden changes in weight have been known to affect the menstrual cycle, with severe weight loss being linked to the absence of a period, known as amenorrhea, because of an imbalance in hormones. Intense exercise levels have also been linked to a loss of period.