Women who maintain healthy habits before and during pregnancy could prevent about half of all cases of gestational diabetes, according to a study published in The BMJ.

The diabetes research indicates that exercising regularly, maintaining a healthy body weight, eating a nutritious diet, and avoiding smoking are all factors that could help women steer clear of diabetes during pregnancy.

Gestational diabetes is when the body is not able to make and use all of the insulin it needs for pregnancy. Without enough insulin, glucose cannot leave the blood in order to get converted to energy. Thus, glucose builds up in the blood, leading to hyperglycemia, or high blood sugar.

The big three: exercise, diet, and no smoking

For the study, researchers reviewed data from more than 14,000 U.S. women who had about 20,136 babies. First-time gestational diabetes was reported in 823 of those pregnancies.

Women who were at a normal weight at the start of pregnancy, and who ate healthy, didn't smoke, and participated in more than 150 minutes of moderate to vigorous physical activity a week had a 52 percent lower risk of developing gestational diabetes compared with women who did not meet these criteria.

Obesity: #1 risk factor

The single greatest risk factor for developing gestational diabetes was being overweight, which is defined as having a body mass index (BMI) of 25 or greater, prior to pregnancy. Even those at the high end of the normal range (23.0 to 24.9) had a higher risk. Women with a BMI above 33 prior to pregnancy were more than four times more likely to develop gestational diabetes compared with women who had normal BMIs.

With that being said, even women who were overweight or obese before pregnancy reduced their risk of gestational diabetes if they exercised, did not smoke, and maintained a healthy diet, according to the study.

"Although successful modification of diet, exercise, body weight, and smoking habits are not easy for anyone, the findings of lead author Cuilin Zhang and colleagues should give health professionals and women planning a pregnancy the encouragement they need to try even harder," Sara Meltzer, an associate professor of medicine and obstetrics and gynecology at McGill University, wrote in an accompanying editorial.

Gestational diabetes in the U.S.

In the U.S., gestational diabetes affects up to 25 percent of pregnancies, representing a growing health concern. High glucose concentrations during pregnancy have the potential to pose a risk to the baby's health, affecting fetal structure, function, and development, according to a recent study.

It's worth pointing out that a diagnosis of gestational diabetes doesn't mean that you had diabetes before you conceived, or that you will have diabetes after giving birth. But you should follow your doctor's advice regarding blood sugar levels while you're planning your pregnancy to keep you and your baby healthy.

To learn more about gestational diabetes:

Conquer Obesity to Avoid Gestational Diabetes
Can Gestational Diabetes Increase Childs' Risk of Diabetes In the Future?
Gestational Diabetes: Causes