This photograph shows a dead Rhizostoma jellyfish washed up on the shore of Pinedo beach in Valencia, on July 30, 2023, as the Mediterranean Sea is reaching record temperatures. (PHOTO / AFP)

LISBON/MADRID – Millions of people in parts of Portugal and Spain opted to stay inside on Tuesday on the second day of a heatwave sweeping the Iberian Peninsula during peak tourist season that has spurred the spread of wildfires.

In Portugal, authorities declared some 120 municipalities in the north and central areas of the country's interior, as well as in the popular holiday destination of Algarve in the south, at maximum risk of wildfires due to the scorching heat.

High temperatures, combined with strong winds, hampered efforts by more than 1,000 firefighters to extinguish a fire that started on Saturday near Odemira in the Alentejo region, but has since spread southward to the Algarve, forcing the evacuation of at least 1,400 people.

A firefighter puts out the wildfire in Extremadura, Spain, May 19, 2023. (PHOTO / XINHUA)

Weather agency IPMA also put three districts in the northeast on red alert for high temperatures.

Spain's weather agency AEMET said the southern province of Cordoba could see temperatures of up to 44C on Tuesday and warned the heatwave would reach its peak on Wednesday, affecting almost the entire country

On Monday, thermometers in the central towns of Portalegre and Santarem broke five-year local records at 42.1 Celsius and 46.4 C respectively, the latter just short of the national record of 47.3 C set in August 2003.

ALSO READ: Solar power to the rescue amid extreme heat in Europe

In Lisbon, residents and tourists saw some respite as temperatures dropped to 31 C from Monday's more than 41 C, and were expected to remain around that level for the next few days.

In Madrid, visitors waiting in line to enter the Prado museum were sprayed with water by employees.

READ MORE: Scorching heat wave bakes US as heat index soars

"When you work on the street, it gets a bit tougher on hotter days," 26-year-old usher Alberto told Reuters as he spritzed his neck with water.

Steve Allen, a tourist from Canada's British Columbia, said he coped with the heat by trying to stay in the shade, using the subway, eating ice cream and drinking chilled water.

People cool off in a spray of water from a street bar in Sevilla, Spain, May 7, 2023. (PHOTO / XINHUA)

Spain's weather agency AEMET said the southern province of Cordoba could see temperatures of up to 44 C on Tuesday and warned the heatwave would reach its peak on Wednesday, affecting almost the entire country.

According to overwhelming scientific consensus, heatwaves are becoming more frequent, intense and spread out across seasons due to climate change.