A mass of hot, dry air carrying dust from North Africa has pushed temperatures up to 15°C above average, with the mercury topping 40°C in parts of the country.
The State Meteorological Agency said it expected the “unusual and extreme” temperatures to peak on Saturday.
“These will probably be among the warmest temperatures we’ve seen in May in the 21st century,” agency spokesman Ruben del Campo said.
By Friday, a handful of records had already been set. In the southern Spanish city of Jaen, the temperature climbed to 38.7°C — 15 degrees above the seasonal average — in a record for the month of May.
In the central city of Cuenca, the daily low temperature of 19.5°C was two degrees higher than the previous May minimum.
While the temperatures are expected to fall short of what meteorologists in Spain define as a heatwave, what makes this episode singular will be its persistence, with night temperatures expected to hover above 20°C in many places.
High temperatures are forecast to push north-east in the coming days, with little relief expected until after Sunday.
The agency said on Friday it had put four regions on alert due to the heat.
Central regions Castilla-La Mancha, Extremadura and Madrid were under a yellow alert, meaning they were at risk, while in the south Andalusia was under orange alert — warning of a significant risk because of the intense heat.
No region was under red alert, the highest level that corresponds to an extreme risk.
Mr Del Campo characterised the May heat as part of a broader pattern that has seen summer weather start to arrive in Spain nearly a month earlier than it did in the 1980s.
He was unequivocal about the cause. “What’s behind all of this?” Mr Del Campo asked.
“Climate change, obviously anthropogenic, generated by the emission of greenhouse gases linked to human activity.”