BACKGROUND: Acute pancreatitis is a potentially life-threatening inflammation of the pancreas, with a rising incidence in most countries. Recent studies have suggested that acute pancreatitis is associated with increased long-term mortality. However, the extent to which this association is influenced by the development of chronic pancreatitis or comorbid conditions, such as malignant disease, remains unclear. OBJECTIVE: To assess the association between acute pancreatitis and long-term all-cause mortality. METHODS: The Swedish Pancreatitis Cohort (SwePan) was used, including all individuals with a first-time episode of acute pancreatitis in Sweden between 1990 and 2019 who survived the index hospital stay and 1:10 matched pancreatitis-free individuals from the general population. Multivariable conditional Cox proportional hazard models were used to compare mortality among individuals with acute pancreatitis compared with the matched pancreatitis-free control group. RESULTS: In total, 89,465 individuals discharged from hospital with acute pancreatitis and 890,837 matched pancreatitis-free individuals were followed up for 10,155,039 person-years (mean 10.0 years). There were 33,764 (37.7%) deaths among individuals with acute pancreatitis and 265,403 (29.8%) deaths among controls. In multivariable adjusted models, mortality was increased in individuals with acute pancreatitis throughout the follow-up period, particularly among those with severe and non-gallstone-related acute pancreatitis as compared to the matched controls. These results remained statistically significant after censoring the follow-up time for recurrent acute pancreatitis or a diagnosis of chronic pancreatitis. CONCLUSIONS: Acute pancreatitis was associated with increased long-term mortality, even after adjusting for comorbidities, including cancer, and censoring for recurrent acute pancreatitis or chronic pancreatitis. Future research should assess causes of death and focus on understanding long-term morbidity to facilitate prevention through tailored follow-up strategies.