BackgroundDiabetes mellitus (DM) is associated with an increased mortality risk in patients hospitalized with acute myocardial infarction (AMI); however, no studies have investigated the impact of the duration of DM on in-hospital mortality. In this study, we evaluated in-hospital mortality in AMI patients according to DM status and its duration.MethodsUsing health administrative databases of Lombardy, DM patients≥50 years hospitalized with AMI from 2010 to 2019 were included in the analysis and were stratified according to the duration of DM: <5, 5–10, and > 10 years. The primary endpoint was mortality during AMI hospitalization and the secondary endpoint was 1-year mortality in comparison with No-DM patients. Logistic and Cox regressions analyses were used to estimate odds ratios (ORs, CI 95%) and hazard ratios (HRs, CI 95%) for the outcomes, according to DM status and duration and AMI type (STEMI and NSTEMI).ResultsOur study cohort comprised 29,566 and 109,247 DM and No-DM patients, respectively. Adjusted ORs and HRs showed a significantly higher risk of in-hospital mortality (OR 1.50, 95% CI 1.43–1.58) and 1-year mortality (HR 1.51, 95% CI 1.46–1.55) in DM patients in comparison with those without. These risks increased progressively with the duration of DM, with the highest risk observed in patients with DM duration ≥ 10 years (OR 1.59, 95% CI 1.50–1.69 for in-hospital mortality and HR 1.59, 95% CI 1.53–1.64 for 1-year mortality). These findings were similar in STEMI and in NSTEMI patients.ConclusionsOur study demonstrates that the duration of DM parallels mortality risk in patients hospitalized with AMI, highlighting that DM duration should be considered as an important early prognostic risk factor in patients with AMI.