The aim of the study was to determine the association between previous stroke and mortality after coronavirus disease 2019 (COVID-19) according to sex, age groups, and stroke subtypes. Prospective population-based cohort study including all COVID-19 positive cases between February 1 and July 31, 2020. Comorbidities and mortality were extracted using linked health administration databases. Previous stroke included transient ischemic attack, ischemic stroke, hemorrhagic stroke, spontaneous subarachnoid hemorrhage, and combined stroke for cases with more than one category. Other comorbidities were obesity, diabetes, hypertension, ischemic heart disease, atrial fibrillation, heart failure, chronic obstructive pulmonary disease, chronic kidney disease, cirrhosis, dementia, individual socioeconomic index, and deprivation index. Cases were followed up until December 31, 2020. Primary outcome was mortality of any cause after COVID-19 positivity. Cox proportional regression analysis adjusted for comorbidities was used. Stratified analyses were performed for sex and age (<60, 60-79, and ≥80 years). There were 91 629 COVID-19 cases. Previous strokes were 5752 (6.27%), of which 3887 (67.57%) were ischemic, 1237 (21.50%) transient ischemic attack, 255 (4.43%) combined, 203 (3.53%) hemorrhagic, and 170 (2.96%) subarachnoid hemorrhage. There were 9512 deaths (10.38%). Mortality was associated with previous stroke (hazard ratio [HR]=1.12 [95% CI, 1.06-1.18]; P<0.001), in both sexes separately (men=1.13 [1.05-1.22]; P=0.001; women=1.09 [1.01-1.18]; P=0.023), in people <60 years (HR=2.97 [1.97-4.48]; P<0.001) and 60 to 79 years (HR=1.32 [1.19-1.48]; P<0.001) but not in people ≥80 years (HR=1.02 [0.96-1.09]; P=0.437). Ischemic (HR=1.11 [1.05-1.18]; P=0.001), hemorrhagic (HR=1.53 [1.20-1.96]; P=0.001) and combined (HR=1.31 [1.05-1.63]; P=0.016) strokes were associated but not transient ischemic attack. Subarachnoid hemorrhage was associated only in people <60 years (HR=5.73 [1.82-18.06]; P=0.003). Previous stroke was associated with a higher mortality in people younger than 80 years. The association occurred for both ischemic and hemorrhagic stroke but not for transient ischemic attack. These data might help healthcare authorities to establish prioritization strategies for COVID-19 vaccination.