A 69-year-old man died of heat exhaustion on Wednesday in a Madrid hospital where he was rushed after collapsing in the street, while a 40-year-old man died of the same cause near southern Cordoba.
An autopsy is being performed on a 72-year-old man to determine whether he also succumbed to the heat.
Cordoba recorded a peak of 42.3 degrees Centigrade (108.1 degrees Fahrenheit) on Tuesday.
A 48-year-old man became the first victim of the heatwave on Wednesday in the south-central city of Ciudad.
Madrid regional authorities have put the area on alert since Tuesday because of what they say are the dangers posed by the soaring temperatures.
National electricity consumption on Thursday reached a record summer high for the third day in a row due to increased use of air conditioning and refrigerators, the REE state power company said.
This has lead to blackouts in the southern Seville area that left some 50,000 people without power for several hours.
A heatwave killed at least 141 people in Spain last year.