Gestational diabetes is a condition that develops during pregnancy and happens when additional hormones make it hard for the body to use insulin properly.
According to the British National Health Service, about 30,000 women a year in England develop gestational diabetes.
If left untreated, it can lead to serious complications for mother and baby such as pre-eclampsia - high blood pressure during pregnancy - and high birth weights, which can lead to birth injuries or caesarean sections.
The Dietary Intervention in Gestational Diabetes trial, led by researchers at the Universities of Leicester and Cambridge, included 425 women with gestational diabetes and a body mass index (BMI) of over 25.
The group tested two different diets from 29 weeks of pregnancy until their babies were born.
All women received weekly diet boxes containing breakfasts, lunches, dinners and snacks.
One group's boxes contained 2000 calories a day - the recommended intake for the average woman - while the second group had 1200 calories a day.
All boxes comprised 40 per cent carbohydrates, 25 per cent proteins, and 35 per cent fats.
Gestational diabetes is usually treated with diet changes, exercise and blood sugar monitoring, although women can sometimes require medication like metformin or insulin.
Researchers found there was no difference in weight loss, with women across both groups losing an average of three kilograms in the final months of pregnancy.
However, those on the reduced-calorie diet were less likely to need insulin injections to manage blood sugar levels.
Researchers suggested if this method was rolled out in England, it could help about 13,000 women with gestational diabetes avoid insulin treatment.
Claire Meek, a professor of chemical pathology and diabetes in pregnancy at the University of Leicester, said reduced calorie diets promoted weight loss and improved blood sugar levels for people with type 2 diabetes.
But this has never before been tested as a way to help women with gestational diabetes minimise weight gain, she said.
"The safety of mothers and babies taking part in our research is my top priority, and most importantly we found that the reduced calorie diet box was perfectly safe for pregnant women with gestational diabetes and overweight or obesity and their babies," she said.
Gestational diabetes usually goes away on its own after birth, although it can increase a woman's risk of developing type 2 diabetes later in life.
The women who lost weight during the trial also had lower blood sugar levels and improved blood pressure at 36 weeks of pregnancy, the study found.
Weight loss was also linked to an almost 50 per cent lower risk of delivering a large baby.
Researchers monitored the women for three months after birth and found those who lost weight in late pregnancy maintained weight loss.
The findings of the study have been published in Nature Medicine and will be presented at the Diabetes UK Professional Conference 2025 in Glasgow.
Dr Elizabeth Robertson, director of research and clinical at Diabetes UK, which funded the trial, said if left untreated, gestational diabetes increases the risk of poor health for mothers and their babies not only during pregnancy but over their lifetimes.
"With this new understanding, we have the opportunity to help more mothers experience a healthy pregnancy, give birth to healthy babies, and reduce their risk of type 2 diabetes in the future," she said.