"The early morning of May 21 was extraordinarily warm for the time of year in much of the centre and south of the peninsula," national weather agency AEMET wrote on Twitter.
It issued warnings of high temperatures in 10 Spanish regions for Saturday, where temperatures were forecast to reach the high 30s.
On Friday, May temperature records were broken in the city of Jaen, Andalusia, which logged 40C.
AEMET said average temperatures in Jaen were 16C higher than normal for this time of year. Elsewhere in Spain, temperatures were at least 7C higher than usual.
In Madrid, street sweeper Rocio Vazquez, 58, was out working in the direct sun, wearing a face mask.
"This year it seems to have gone directly to summer, but we have to keep going," she said. "It's scorching but it's our job and has to be done."
AEMET spokesperson, Ruben del Campo, said earlier this week that, if officially confirmed, it could be the first ever heatwave recorded in May.
"This episode is very unusual for mid-May and could be one of the most intense episodes in the last 20 years," he said.
In Cordoba, Andalusia, a group of women who had come from Madrid for a hen party were feeling the heat, one dressed as a pink flamingo.
"It is really hot, we're (battling it) with a lot of water," said bride-to-be was Bea Ovejero, 31.
(Reporting by Michael Gore and Elena Rodriguez in Madrid and Mariano Valladolid in Cordoba; Writing by Jessica Jones; Editing by Clelia Oziel)