Authorities evacuated two villages in the hilly Monchique area and 10 aircraft carrying water were brought in to fight the flames.
Last year 114 people were killed in two massive wildfires in Portugal.
Civil protection officials have sent text alerts warning people of an extreme risk of fire in some regions.
Temperatures in Spain and Portugal will remain above 40C until Sunday at least.
It has been the most severe heatwave in Iberia since 2003, one of the worst years on record for forest fires.
Read on EuroNews