Studies show that excess weight gain in pregnancy poses a host of health issues for both the mother and her child.

Nearly half of women gain more weight than they should while pregnant.

That’s according to a recent global review.

And that’s a big problem.

Researchers say these mothers-to-be are setting themselves up to be heavier throughout their lives and increasing the health risks for their children.

For starters, a baby is likely to be born too big if the mother gains excessive weight during pregnancy.

Bigger babies may have a higher risk of heart disease and obesity later in life. The same is true for babies born quite small.

Among Americans, earlier research found 70 percent of overweight women, and 64 percent of obese women gain more than recommended while pregnant. Overall, 53 percent of all women do.

The new review, published in the Journal of the American Medical Association (JAMA), analyzed data from 23 studies that included more than 1.3 million women in all.

If a woman gained too much weight, the risk of bearing a baby considered oversize — larger than 8 pounds, 3 ounces — nearly doubled. These same women increased their risk of a surgical delivery by 30 percent.

They were less likely, however, to have preterm babies or small ones.

Read more: Does being around a baby help boost fertility? »

The analysis didn’t contain surprises, observers say, but it feeds into the debate about the best pregnancy strategy for overweight and obese women.

“So many women are entering pregnancy above a healthy weight,” Helena Teede, an endocrinologist in Australia and a study lead author, told Healthline in an email.

Ten of the studies were from the United States, where women tended to be heavier than in the overall sample, she noted.

Current guidelines from the Institute of Medicine, which are supported by the American Congress of Obstetricians and Gynecologists (ACOG), advise obese women to gain 11 to 20 pounds while pregnant.

Some experts say that’s too much, and that the most obese might even try to lose weight while carrying.

Teede disagrees.

“The results affirm that women, no matter how unhealthy their weight, shouldn’t lose weight in pregnancy,” she said.

In the new analysis, gaining less than recommended increased the risk of a preterm birth or undersize baby for women of all weights, including obese women.

The better goal for obese women: Lose weight before conceiving.

“It’s incredibly important,” Aaron Caughey, MD, PhD, who treats at-risk pregnant women at Oregon Health & Science University, told Healthline.

Read more: More new mothers are asking for long-term birth control »

You’ll hear while pregnant that you’re “eating for two.”

Actually, in the first trimester it’s best to eat normally. Women can eat 350-450 extra calories per day during the next two trimesters, depending on their starting weight.

Under the Institute of Medicine guidelines, underweight women should gain around a pound a week in the second and third trimesters, up to 28 to 40 pounds in all.

If you start off at a normal weight, aim to gain 25 to 35 pounds.

Overweight women should aim for 15 to 25 pounds, and obese women no more than 20, which averages out to half a pound a week.

The totals roughly double for twins, if you’re overweight or obese.

Line up support to eat healthily, too.

“If we see a pregnant woman drinking alcohol, we say, ‘Oh my God, don’t drink alcohol pregnant,’” Caughey noted. “But when we see a woman drinking a giant Slurpee, we don’t say anything. It’s potentially just as harmful as a little bit of alcohol.”

Read more: Why is the maternal death rate in the US so high? »

Pregnancy is a time when women may be most open to picking up new good health habits, and exercise during pregnancy is a good idea, experts say.

“The easiest thing is to walk,” Diana Ramos, an OB-GYN in the Los Angeles area, told Healthline.

She urges pregnant women who can’t get out to get exercise at home.

“Instead of sitting down after dinner and watching TV, stand up and walk in place,” she suggested.

ACOG recommends that women without major medical or obstetric complications get at least 20 to 30 minutes of moderate-intensity aerobic exercise on most days of the week, but research suggests most American women are getting less.

Especially combined with careful eating, exercise may help women avoid gaining too much, reduce surgical deliveries and hypertension, and cut the chances of an oversize newborn or a baby with breathing problems, according to a 2015 research review reported by the Cochrane Library.

Even obese women and women with high blood pressure or gestational diabetes may safely exercise, according to a jointly-authored opinion piece published in JAMA in March.

In fact, the authors pointed out that mistaken advice not to exercise combined with gaining weight had turned pregnancy into “a major contributor to the worldwide obesity epidemic,” with post-birth health risks for mothers and babies.

Read more: Are opioids over-prescribed for women who’ve had C-sections? »

One big reason pregnancy is contributing to the obesity epidemic is that too many women aren’t losing their pregnancy gain.

In a five-site U.S. study reported in 2015 in the journal Obstetrics and Gynecology, about 75 percent of the participants were heavier a year after giving birth than before their pregnancy.

Nearly half had kept 10 extra pounds, and 24 percent had kept 20 pounds. In this group, 40 percent of the participants were of normal weight before pregnancy, but a third of them had become obese or overweight a year later.

This also sets up the children for future obesity.

There’s evidence that a “set point” for weight is established in the womb, Caughey observed, with lingering effects.

For example, a 2012 German study published in PLOS ONE found that women who gained too much pregnancy weight linked to a 28 percent increase in the chance that their 5-year-old or 6-year-old was overweight, even if these women were of a normal weight.

The children of mothers who are obese are much more likely to become obese and stay that way.

“It’s important as parents to set a role model for children of healthy habits,” Ramos told Healthline.

The best idea is to improve your habits before you conceive, Caughey said.

“If you’re even thinking of becoming pregnant in a year or two, eat better and exercise,” he said.

After you give birth, keep up the exercise.

Ramos founded a program in Los Angeles called Choose Health LA Moms that texted new mothers three times a week for three months, urging them to breastfeed, walk, and drink water.

On average, moms in the program lost nearly all their pregnancy gain and “the whole family ended up walking more,” Ramos told Healthline.