Obesity during pregnancy poses one of the biggest risks to the health of an unborn child, research has shown.
Obesity posed a big risk to the baby's development
Spanish doctors found it was one of the most decisive factors in the development of heart, kidney and urinary tract defects.
Women should be aware of the dangers of being overweight, they say.
The researchers from Barcelona's Hospital de Sant Pau report their findings, based on 2,060 children, in the journal Diabetologia.
It has long been known that women who are diabetic before pregnancy have a higher chance of having birth defects that can lead to heart and kidney problems.
This is linked to the mother having high blood sugar levels at a time when the embryo's organs are forming.
Babies born to women with a condition called gestational diabetes - diabetes triggered by pregnancy - are also at risk of birth defects for the same reason.
The chance of damage is slightly lower because the mothers' blood sugar levels are usually fairly unaltered.
Diabetes and obesity are closely linked.
However, the latest study found the risk of birth defects seemed to more closely related to a woman's level of obesity, than to the severity of her diabetes.
Dr Rosa Corcoy and colleagues looked at the relationship between the mother's blood sugar levels and weight and birth defects in more than 2,000 children born to women with gestational diabetes.
The mother's degree of obesity, measured by body mass index, appeared to be the main predicting factor for heart defects in the unborn child.
It was the only factor that predicted whether the baby was likely to be born with kidney and urinary tract problems.
Previous studies have not shown that obesity can increase the risk of heart defects in the children of women with diabetes, possibly because this factor was not studied specifically, said Dr Corcoy.
She said one explanation was that being obese was an indication that the nutrients required for development were in over-abundant supply.
An excess of glucose and other nutrients has been linked to birth defects before.
She said the resistance to insulin that occurs in diabetes might also be important.
"This is just one of the problems that obesity can have during pregnancy," said Dr Corcoy, from the Universitat AutÚnoma de Barcelona.
She recommended women planning to have a family consider their weight, but added: "It would not be good to lose weight very quickly before pregnancy because of the negative effects that could also have for mother and baby."
Amanda Vezey, care advisor for Diabetes UK said: "This is an interesting piece of research which reinforces the importance of being a healthy weight.
"We know that obesity is amongst the risk factors which can make you more likely to have gestational diabetes. This research further highlights the importance of trying to maintain a healthy weight when planning to become pregnant."
A spokeswoman from the National Childbirth Trust said: "This study emphasises the need to address factors that lead to overweight in young women as not only their own health, but that of their children could be affected.
"Often the most unhealthy foods have the most promotion. Women need positive information to make healthy choices for themselves and their children.
"However, individual women who are pregnant and worried should remember that the proportion of babies affected is small, and discuss this with their midwife or doctor," she said.