More than 600 firefighters on Tuesday brought a blaze under control a day after it broke out in southern Portugal forcing dozens of people to flee their homes.
The civil protection authority said the active blaze in the tourist region of Algarve had been brought under control, although it has already burnt at least 9,000 hectares of forests, orchards and brushland.
Portugal is the latest European nation to have faced heatwaves and fires this summer, which climate scientists warn will become increasingly common due to man-made global warming.
The fire started in the municipality of Castro Marim, in the hinterland near the Spanish border, regional civil protection commander Richard Marques said.
Strong winds pushed it swiftly towards the town of Tavira and Vila Real de Santo Antonio, forcing the removal of 81 people from local villages, said the emergency services.
One firefighter was sent to hospital after being burnt and two others were treated after inhaling smoke, a spokesman for civil protection told AFP.
Witnesses said several farm and residential buildings had been damaged by the fire, but the local authorities are yet to confirm those reports.
As the flames spread through pine forests towards the coast, authorities on Monday closed the motorway that crosses Algarve, although it was reopened on Tuesday.
The 600 firefighters were supported by about 200 vehicles and eight aircraft.
Faced with a heatwave that has lasted since Friday, the government decided on Monday to extend a fire alert by 48 hours.
Memories are still fresh of the horrific fires that killed dozens of people in Portugal in 2017.
In neighbouring Spain, a fire that broke out on Saturday in Navalacruz, near the central city of Avila, was reported to be abating.
About 1,000 people had to be moved to safety from the area over the weekend as the wildfire blazed through 12,000ha of forestry.
A heatwave has gripped Spain since last Wednesday, with temperatures reportedly reaching 47.4°C in Andalusia on Saturday, which would be a record for Spain if the figures were officially confirmed.
Italy, Greece, Algeria and Turkey have also experienced heatwaves and devastating wildfires this summer, as has Algeria, across the Mediterranean.