Abstract Objective To assess whether statin treatment is associated with a reduction in atherosclerotic cardiovascular disease (CVD) and mortality in old and very old adults with and without diabetes. Design Retrospective cohort study. Setting Database of the Catalan primary care system (SIDIAP), Spain, 2006-15. Participants 46 864 people aged 75 years or more without clinically recognised atherosclerotic CVD. Participants were stratified by presence of type 2 diabetes mellitus and as statin non-users or new users. Main outcome measures Incidences of atherosclerotic CVD and all cause mortality compared using Cox proportional hazards modelling, adjusted by the propensity score of statin treatment. The relation of age with the effect of statins was assessed using both a categorical approach, stratifying the analysis by old (75-84 years) and very old (≥85 years) age groups, and a continuous analysis, using an additive Cox proportional hazard model. Results The cohort included 46 864 participants (mean age 77 years; 63% women; median follow-up 5.6 years). In participants without diabetes, the hazard ratios for statin use in 75-84 year olds were 0.94 (95% confidence interval 0.86 to 1.04) for atherosclerotic CVD and 0.98 (0.91 to 1.05) for all cause mortality, and in those aged 85 and older were 0.93 (0.82 to 1.06) and 0.97 (0.90 to 1.05), respectively. In participants with diabetes, the hazard ratio of statin use in 75-84 year olds was 0.76 (0.65 to 0.89) for atherosclerotic CVD and 0.84 (0.75 to 0.94) for all cause mortality, and in those aged 85 and older were 0.82 (0.53 to 1.26) and 1.05 (0.86 to 1.28), respectively. Similarly, effect analysis of age in a continuous scale, using splines, corroborated the lack of beneficial statins effect for atherosclerotic CVD and all cause mortality in participants without diabetes older than 74 years. In participants with diabetes, statins showed a protective effect against atherosclerotic CVD and all cause mortality; this effect was substantially reduced beyond the age of 85 years and disappeared in nonagenarians. Conclusions In participants older than 74 years without type 2 diabetes, statin treatment was not associated with a reduction in atherosclerotic CVD or in all cause mortality, even when the incidence of atherosclerotic CVD was statistically significantly higher than the risk thresholds proposed for statin use. In the presence of diabetes, statin use was statistically significantly associated with reductions in the incidence of atherosclerotic CVD and in all cause mortality. This effect decreased after age 85 years and disappeared in nonagenarians.