The high temperatures are set to continue over the weekend when storms are expected to sweep the peninsula dumping rain carrying sand from the Sahara.
Spain's meteorological agency, Aemet, put 20 provinces on alert for high temperaturas with the worst affected in Extrenadura, Toledo and Córdoba.
The mercury will continue to rise from Thursday intensifying over the weekend with temperatures expected to top 42 C in Toledo, Mérida, Sevilla and Cordoba.
Coastal areas along east of the country will be cooler with temperatures from Barcelona to Alicante and Murcia not expected to rise above 35 degrees on Thursday.
Spain is considered to be at high risk of forest fire during the heatwave with people urged to be extremely vigilant.
Storms are expected to sweep north from the Sahara desert and hit the peninsula from Friday bringing red dust.