Firefighters were battling a series of blazes on Saturday after days of unusually high temperatures that reached up to 45.7 degrees Celsius (114 Fahrenheit).
The nearly week-long heatwave has caused 360 heat-related deaths, according to figures from the Carlos III Health Institute.
More than 3,000 people have now been evacuated from homes due to a large wildfire near Mijas, a town in the province of Malaga that is popular with northern European tourists, the region's emergency services said in a tweet early on Saturday.
Many were taken to shelter in a provincial sports centre.
Elsewhere in Spain, fires burned in parts of the Extremadura region, close to the Portuguese border, where members of Spain's Military Emergency Unit were deployed to help tackle the flames.
Thick black plumes of smoke rose into the air near Casas de Miravete as helicopters dumped water on flames that have scorched 3,000 hectares, forced the evacuation of two villages and threatened to reach the Monfrague national park.
Fires were also burning in the central region of Castille and Leon, Galicia in the north and Malaga province in the south.
A wildfire spreading in Spain's Alhaurin el Grande raged late into the night on Saturday, threatening local residents as thousands were evacuated from their homes.
Trees were ablaze and smoke could be seen billowing in the skyline in the province of Malaga, as blistering summer temperatures put authorities on alert in parts of Europe.
A sports centre in the town was turned into a shelter, with rows of beds filling the hall. Food packages were prepared for locals who were rushed out of their homes as the wildfire spread.
Ellen McCurdy, a pensioner who owns a house in the area, said she and her husband only grabbed a few essentials before running out onto the street.
"By that stage, everybody along the street, the ´calle´, was on the move, cars and on the main street there were a lot of ambulances and fire engines and movement and well everyone seemed to be evacuating really," she told Reuters.
"I didn't take it too seriously. I thought they had it under control and I was quite surprised when it seemed to be moving in our direction and then we were told to go. So we have left a lot of stuff behind," added her husband, William.
Local councillor Mari Carmen Molina said the wildfire was a threat to the houses of many locals.
The United Kingdom is preparing for extreme heat in the coming days, Britain's Health Secretary Steve Barclay said on Saturday.
Barclay said the government and ambulance trusts were putting in extra measures to deal with any increased demand caused by possibly unprecedented temperatures.
Britain's weather forecaster last week issued its first red "extreme heat" warning for parts of England on Monday and Tuesday.
Officials are worried about the effects on people's health and on a healthcare system already challenged by the Covid-19 pandemic as searing heat sweeps the country.
Barclay said Covid is an "additional pressure" but the government is making sure all the hospitals maximise their capacities to ensure that people are not waiting longer than they need.
The highest recorded temperature in Britain was 38.7 C (101.7 F) recorded in Cambridge on July 25, 2019.