Firefighters in Portugal battled to contain wildfires engulfing thousands of hectares amid soaring temperatures.

Around 800 personnel attended a fire near the southern town of Odemira overnight, with more than 1,400 people having to evacuate and at least nine firefighters being injured. Temperatures in excess of 40C (104F) are expected to hit much of the Iberian peninsula this week.

Three major fires that scorched hundreds of hectares in Spain over the weekend have been brought under control, but weather alerts remain in place across much of the country. Temperatures of 46.4C (116F), the hottest of the year so far, were recorded in Santarém.

The fire near Odemira was driven south into the hilly interior of the Algarve, Portugal's main tourism region, by strong winds. It has so far destroyed some 6,700 hectares (16,600 acres) of land, while a total of 19 villages, four tourist accommodations and a camping site have been evacuated, with the town's mayor, Helder Guerreiro, described the situation as "critical, difficult, and complex".

In the centre of the country, other major fires prompted the closure of several stretches of motorway, including parts of the A1 between Lisbon and Porto. Sixteen waterbombing aircraft have been deployed to support firefighting efforts across the two areas.

Authorities have declared more than 120 municipalities across Portugal at maximum risk of wildfires. With this week's heatwave will mark the third to hit the Iberian peninsula this summer, in Spain, fires near the south-western coastal cities of Cadiz and Huelva and in the northern Catalonia region scorched more than 1,000 hectares (2,470 acres) in total over the weekend. 

Ruben del Campo of Spain's State Meteorological Agency said that it was being caused by a large mass of hot, dry air from North Africa and would be more intense and widespread than the two that hit in July. Climate change increases the risk of the hot, dry weather that is likely to fuel wildfires.

The world has already warmed by about 1.1C since the industrial era began and temperatures will keep rising unless governments around the world make steep cuts to emissions.