Infections are a major clinical challenge for type 2 diabetes patients, but little is known about the impact of glycemic control. We used Cox regression analyses to examine the association between baseline and time-varying hemoglobin A1c (HbA1c) values and development of community antiinfective-agent-treated and hospital-treated infections in 69,318 patients with type 2 diabetes diagnosed between 2000 and 2012 in Northern Denmark. Incidence rates were 394/1,000 patient-years for community-treated infections and 63/1,000 patient-years for hospital-treated infections. The adjusted hazard ratios for community-treated infection at an HbA1c level of =10.50%, as compared with 5.50%-