Spanish firefighters were gaining the upper hand on Tuesday in their battle against a wildfire raging for a week on the holiday island of Tenerife that forced thousands of people to flee, officials said.

About 600 firefighters and soldiers backed by 22 water-dropping planes were battling the blaze, which broke out late August 15 in an area of steep ravines and cliffs in the northeast of the island, part of Spain's Canary Islands archipelago off the northwestern coast of Africa.

Officials said cooler overnight temperatures and weaker winds had helped firefighters fight the flames, which have so far burned nearly 15,000 hectares (37,000 acres).

"This has not ended, but we are starting to see the end of the tunnel," the archipelago's head of emergencies, Manuel Miranda, told a news conference in Santa Cruz de Tenerife, the island's capital.

The fire, which now has a perimeter of around 88 kilometres (55 miles), forced the evacuation of over 12,000 people, but officials said some from the villages of Arafo and Candelaria have been allowed to return to their homes.

The head of the local government of Tenerife, Rosa Davila, said officials were considering allowing more evacuees from other villages to return home shortly.

"We are looking to return to normal, little by little," she told the news conference.

During a visit to Tenerife on Monday, Prime Minister Pedro Sanchez said his government would classify the areas affected by the blaze as disaster zones, a move which will trigger emergency subsidies and other support measures.

The blaze broke out after the archipelago suffered a heatwave that left many areas tinder dry.

The Canary Islands typically experience spring-like temperatures all year, but temperatures have recently soared to 40 degrees Celsius (104 Fahrenheit) in some parts.

The seven-island archipelago is located off the northwest coast of Africa and southwest of mainland Spain. At their nearest point, the islands are 100 kilometres (60 miles) from Morocco.

As global temperatures rise due to climate change, scientists have warned that heatwaves will become more frequent and more intense.

Last year, Spain suffered more than 500 blazes that destroyed more than 300,000 hectares, making it the worst-hit country in Europe, according to the European Forest Fire Information System (EFFIS).

So far this year, it has had 340 fires, which have ravaged almost 76,000 hectares, EFFIS figures show.