More than 1,350 residents have been evacuated in Spain's northeastern region of Aragon as a wildfire spread through a pine forest amid a lingering heat wave, a local official said.

Five villages were evacuated on Sunday as flames devoured hills located 375km northeast of Madrid, said Javier Lamban, the president of Aragon.

The evacuees, who included residents of a retirement home, were transferred to nearby towns.

About 500 firefighters using almost 100 pieces of equipment, including aircraft, were fighting the flames, which were being fanned by windy conditions and creating a large plume of smoke.

The fire, which broke out on Saturday afternoon, has already burned close to 8,000 hectares of forest in a remote area, according to Ministry of Agriculture and Environment spokesman Modesto Lobon.

Meanwhile, the fire department in the northeastern region of Catalonia said it was combating a wildfire that had broken out in Cardedeu, 40km north of Barcelona, and had destroyed two houses and several cars, although no one was injured.

Weather stations across Spain had first warned people on June 27 to take extra precautions as a heat wave that was due to engulf much of the country for an extended period of time would increas the risk of wildfires.

Spain's meteorological agency predicts that hot weather across the Iberian Peninsula, with temperatures reaching 40 degrees celsius, will last another week.

In Portugal, the National Civil Protection Authority said almost 100 firefighters were tackling a wildfire that broke out on Saturday night in the forests of Alcobertas, north of Lisbon.

Source: Agencies