© 2019 The Author(s). Published by Elsevier Ltd. This is an Open Access article under the CC BY-NC-ND 4·0 license Background: Climate change driven by human activities has increased annual temperatures in Spain by around 1°C since 1980. However, little is known regarding the extent to which the association between temperature and mortality has changed among the most susceptible population groups as a result of the rapidly warming climate. We aimed to assess trends in temperature-related cardiovascular disease mortality in Spain by sex and age, and we investigated the association between climate warming and changes in the risk of mortality. Methods: We did a country-wide time-series analysis of 48 provinces in mainland Spain and the Balearic Islands between Jan 1, 1980, and Dec 31, 2016. We extracted daily cardiovascular disease mortality data disaggregated by sex, age, and province from the Spanish National Institute of Statistics database. We also extracted daily mean temperatures from the European Climate Assessment and Dataset project. We applied a quasi-Poisson regression model for each province, controlling for seasonal and long-term trends, to estimate the temporal changes in the province-specific temperature-mortality associations with distributed lag non-linear models. We did a multivariate random-effects meta-analysis to derive the best linear unbiased prediction of the temperature–mortality association and the minimum mortality temperature in each province. Heat-attributable and cold-attributable fractions of death were computed by separating the contributions from days with temperatures warmer and colder than the minimum mortality temperature, respectively. Findings: Between 1980 and 2016, 4 576 600 cardiovascular deaths were recorded. For warm temperatures, the increase in relative risk (RR) of death from cardiovascular diseases was higher for women than men and higher for older individuals (aged ≥90 years) than younger individuals (aged 60–74 years), whereas for cold temperatures, RRs were higher for men than women, with no clear pattern by age group. The heat-attributable fraction of cardiovascular deaths was higher for women in all age groups, and the cold-attributable fraction was larger in men. The heat-attributable fraction increased with age for both sexes, whereas the cold-attributable fraction increased with age for men and decreased for women. Overall minimum mortality temperature increased from 19·5°C between 1980 and 1994 to 20·2°C between 2002 and 2016, which is similar in magnitude to, and occurred in parallel with, the observed mean increase of 0·77°C that occurred in Spain between these two time periods. In general, between 1980 and 2016, the risk and attributable fraction of cardiovascular deaths due to warm and cold temperatures decreased for men and women across all age groups. For all the age groups combined, between 1980–94 and 2002–16, the heat-attributable fraction decreased by −42·06% (95% empirical CI −44·39 to −41·06) for men and −36·64% (−36·70 to −36·04) for women, whereas the cold-attributable fraction was reduced by −30·23% (−30·34 to −30·05) for men and −44·87% (−46·77 to −42·94) for women. Interpretation: In Spain, the observed warming of the climate has occurred in parallel with substantial adaptation to both high and low temperatures. The reduction in the RR and the attributable fraction associated with heat would be compatible with an adaptive response specifically addressing the negative consequences of climate change. Nevertheless, the simultaneous reduction in the RR and attributable fraction of cold temperatures also highlights the importance of more general factors such as socioeconomic development, increased life expectancy and quality, and improved health-care services in the country. Funding: None.