Infants with genetic diseases, born from multiple pregnancies and those whose mothers had extremely low or high BMI were not included.
Higher blood sugar in early pregnancy raises the babys risk of a congenital heart defect, a study claims.
"We found that in women who develop diabetes during pregnancy, we can measure risk for having a child with congenital heart disease by looking at their glucose values during the first trimester of pregnancy," said James Priest, from the Stanford University School of Medicine in the US.
The research team studied medical records from 19,107 pairs of mothers and their babies born between 2009 and 2015.
The records, published in The Journal of Pediatrics, included details of the mothers prenatal care, including blood test results and any cardiac diagnoses made for the babies during pregnancy or after birth.
Infants with certain genetic diseases, those born from multiple pregnancies and those whose mothers had extremely low or high body-mass-index measures were not included in the study.
Of the infants in the study, 811 were diagnosed with congenital heart disease, and the remaining 18,296 were not.
After excluding women who had diabetes before pregnancy or who developed it during pregnancy, the results showed that the risk of giving birth to a child with a congenital heart defect was elevated by eight per cent for every increase of 10 milligrammes per decilitre in blood glucose levels.