BackgroundExtensive evidence links both cold and hot temperatures to an increased incidence of occupational injuries. Contextual modifiers of the temperature-injury association have been scarcely researched. The present study addresses temporal and spatial variations to identify factors associated with (mal)adaptation to heat and cold among Spanish workers. MethodsWe assessed the association between daily mean temperature and work injuries using quasi-Poisson time-series regression models in 48 Spanish provinces over the period 1988–2019, with comparative analyses with census and economic data for the sub-periods 1989–1993, 1999–2003, 2009–2013 and 2015–2019. We explored the spatial and spatiotemporal modification of the association by demographic and socioeconomic variables via cross-sectional and longitudinal meta-regressions. Findings:We found an increased risk of work-injuries by 4 % [95 % CI: 3 %-6 %] and 12 % [95 % CI: 10 %-13 %], for the 1st and 99th percentiles of temperature, respectively, for period 1988–2019. Heat had a greater overall impact than cold, and the groups more vulnerable to heat were male workers, under 35 years, and working in agriculture, construction and hostelry. Vulnerability to heat was highest in the earliest sub-period, while vulnerability to cold rose during periods of both economic expansion and recession. High educational attainment emerged as a protective factor during the warm months in the cross-sectional meta-regressions. ConclusionsOur findings suggest an adaptation of Spanish workers to high temperatures over time. However, preventive measures are needed for traditionally exposed workers (agriculture and construction), non-traditionally vulnerable sectors (hostelry), and young, male, and less educated workers during warm months. For cold vulnerability, targeted measures should focus on women, the elderly, and tertiary service workers, especially in colder regions. Addressing temperature vulnerability would enhance worker safety, reduce injuries, and yield economic benefits.