ObjectiveTo assess the prevalence of gestational diabetes mellitus and the main associated risk factors in the population served by the Brazilian Unified Health System in the city of Caxias do Sul, state of Rio Grande do Sul.Materials and MethodsA descriptive, cross-sectional and retrospective study was conducted. Maternal variables were collected from the medical records of all pregnant women treated at the basic health units in 2016. Hyperglycemia during pregnancy (pregestational diabetes, overt diabetes and gestational diabetes mellitus) was identified by analyzing the results of a 75-g oral glucose tolerance test, as recommended by the Brazilian Ministry of Health. Based on the data, the women were allocated into two groups: the gestational diabetes group and the no gestational diabetes group.ResultsThe estimated prevalence of gestational diabetes among 2,313 pregnant women was of 5.4% (95% confidence interval [95%CI]: 4.56–6.45). Pregnant women with 3 or more pregnancies had twice the odds of having gestational diabetes compared with primiparous women (odds ratio [OR] = 2.19; 95%CI: 1.42–3.37;p< 0.001). Pregnant women aged 35 years or older had three times the odds of having gestational diabetes when compared with younger women (OR = 3.01; 95%CI: 1.97–4.61;p< 0.001). Overweight pregnant women were 84% more likely to develop gestational diabetes than those with a body mass index lower than 25 kg/m2(OR = 1.84; 95%CI: 1.25–2.71;p= 0.002). A multivariable regression analysis showed that being overweight and being 35 years old or older were independent variables.ConclusionIn this population, the prevalence of gestational diabetes mellitus was of 5.4%. Age and being overweight were predictive factors for gestational diabetes.