Across the border in Spain, fires reached the outskirts of the port city of Vigo, forcing the temporary closing of a car factory. Television news reports and videos shared on social media showed residents forming human chains to pass water buckets in order to help put out flames.
The Spanish authorities said that more than 90 fires were burning in the northern regions of Galicia and Asturias. Prime Minister Mariano Rajoy, who is from Galicia, traveled on Monday to his home region, where the authorities confirmed that at least four people had died.
More than 50 people have been injured.
A spokeswoman for the agency told reporters that firefighters were still tackling 145 separate fires, 32 of which were serious.
"We can confirm the deaths of 27 people in the districts of Coimbra, Castelo Branco, Viseu and Guarda," AFP quoted Patricia Gaspar as saying.
Thousands of firefighters are battling the flames, which erupted across north-eastern Portugal and parts of Spain over the weekend after a hot dry summer.
In Spain, at least three people have died.
Conditions were worsened by Hurricane Ophelia, which is approaching Europe's western coast, bringing strong winds to fan and spread the flames.
The wildfires follow a massive forest blaze in June which killed 64 people and injured more than 130.
More about: #Portugal