Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LISBON, Portugal — A major forest fire in Portugal's Madeira Islands forced the evacuation of more than 400 people and left 174 others seeking medical treatment, officials said Tuesday.

The wildfire encroaching on the capital Funchal is now under control and cooler temperatures forecast for Wednesday are expected to help put it out, the head of Madeira's regional government, Miguel Albuquerque.

Albuquerque told a news conference that most of those needing treatment had inhaled smoke and only one person was severely hurt, with burns. He said at least 27 homes were left uninhabitable on the island off Africa's northwest coast.

Other wildfires have raged for several days on the Portuguese mainland. By Tuesday evening, fire officials said seven major blazes in the countryside were out of control. The National Civil Protection service said just over 4,000 firefighters supported by 26 water-dumping planes and 1,262 vehicles were attending 149 blazes of varying sizes across the country.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The month of August, when temperatures are high, winds blow strongly and woodland is parched, is traditionally the peak time for wildfires in Portugal and other southern European countries. Portuguese officials say fires are often started deliberately and spread quickly because forests are not cleared of dead wood.

Flames licked at homes around Funchal, casting a smoke plume over the downtown, according to video broadcast by cable news channel S.I.C Noticias. Frantic locals used garden hosepipes and buckets of water to keep the flames at bay as wind blew embers across roads.

Fire service officials said Madeira's steep hills and dense woodland made it hard to reach the flames, which were fueled by high winds.

Eight Madeira firefighters required medical treatment after inhaling smoke as high winds fueled the blaze. More than 200 patients were evacuated from a small hospital as a precaution, authorities said.

Some of the worst-hit areas were in northern Portugal, where temperatures have exceeded 86 Fahrenheit in recent days. The region's pine and eucalyptus forests are tinder-dry after a long spell without significant rain.

In the area around Viseu, 180 miles north of the capital Lisbon, a wildfire forced the closure of a major highway. In nearby Agueda, roads were closed and power lines were cut by wildfires.

In Lisbon, Tuesday was hazy with a smell of smoke caused by wildfires in the surrounding region.

Fire chiefs said some of their firefighters were exhausted after trying to put out blazes non-stop since Saturday, the hottest day of the year so far when temperatures reached 111 Fahrenheit.