Background and objective: We compared the incidence and outcome of pulmonary embolism (PE) in individuals with and without type 2 diabetes mellitus (T2DM) in Spain during 2004-2013.Methods: The study was based on National Hospital Discharge Data, and the study population comprised patients hospitalized for PE. Annual incidence rates were classified according to T2DM status. In-hospital mortality (IHM), length of hospital stay (LOHS), comorbidities and use of diagnosis and therapeutic procedures were analysed. Results: We identified 123 872 discharges of patients (56 361 men and 67 511 women) with PE as their primary diagnosis (15.3% with T2DM). Incidence of discharge diagnoses of PE increased significantly in all groups. Crude rates were higher in diabetic patients. A positive association was identified between T2DM and PE: adjusted IRR was 2.00 (95% CI: 1.95-2.05) for men and 2.50 (95% CI: 2.45-2.57) for women. LOHS, readmissions and IHM decreased significantly for both groups. An association between IHM and risk factors (older age, Charlson comorbidity index >3, atrial fibrillation and cancer) was observed. T2DM was associated with higher IHM in men (OR: 1.22, 95% CI: 1.12-1.32) and women (OR: 1.24, 95% CI: 1.15-1.33). The use of computed tomography pulmonary angiography increased significantly overtime. Conclusion: We confirmed that in both men and women, diabetes was an independent risk factor for IHM. The incidence of discharge of patients with PE increased significantly during the study period. Diabetic