At least 36 people died in wildfires raging through parched farmlands and forests in Portugal and another three in neighboring northwestern Spain on Sunday and Monday.

Firefighters were battling 50 blazes in Portugal and a similar number in Spain. Portugal's government asked for international help and declared a state of emergency in territory north of the Tagus river - about half of its landmass.

Flames ripped across Iberian countryside left tinder-dry by an unusually hot summer and early autumn, fanned by strong winds as remnants of ex-Hurricane Ophelia brushed coastal areas.

Television footage showed abandoned villages with many houses in embers and charred vehicles left on the roads.

Portuguese opposition parties and the media harshly criticized the government for failing to prevent a new wave of deadly fires after the country's worst ever forest fire in June that killed 64 people.

Prime Minister Antonio Costa, however, refused to sack his interior minister and defended his government's attempts to reform the troubled forestry management system.

"It's a structural problem that we are facing... This is not a time for resignations, but for solutions. Everything has to be transformed into reforms, to provide responses that the country needs so that nothing stays the way it was after this year," he told reporters after a television address to the nation.

"We are aware that the country wants results from us and we're running against time after decades of negligence," Costa told reporters after his address.

POOR LAND MANAGEMENT

At the heart of the problem is poor land management in Portugal, where traditional small plots have become fire hazards after being abandoned by successive generations of landholders who moved to the cities.

Interior Minister Constanca Urbano de Sousa said climate change was also to blame. "We are facing new (weather) conditions ... In an era of climate change, such disasters are becoming reality all over the world," she said, citing the wildfires burning in California.

The weekend fires also injured 63 people in Portugal, civil protection service spokeswoman Patricia Gaspar said. The toll could still increase as seven people were unaccounted for.

Water-spraying planes could not be deployed against most fires due to gigantic plumes of smoke that reduced visibility.

But Gaspar said rains expected late on Monday and on Tuesday in the north of Portugal were likely to bring some relief.

The Lisbon government has been criticized for a slow, inefficient response and a lack of fire-prevention policies, leaving Portugal with Europe's largest expanse of woodland burned by wildfires.

Portugal's fires have burned over 40 percent of the total in all of the European Union this year. With just 2.1 percent of the EU's landmass, Portugal suffered the biggest fires during 2008-16 as well, with an average of 36 percent of the total.

Three people died in Spain's northwestern Galicia region - two of them women found inside a burnt-out car, the third a man in his 70s killed as he tried to save his farm animals, according to local media.

Most of the fires in Galicia were started deliberately, said Alberto Nunez Feijoo, head of the regional government.

Spanish Interior Minister Juan Ignacio Zoido said some of those responsible had already been identified. They could face up to 20 years in jail if convicted. At least two persons were arrested in Portugal for allegedly starting fires.