LISBON, Portugal -- Wildfires in Portugal killed at least 27 people, injured dozens more and left others missing in the country's second such tragedy in four months, officials said Monday. In neighboring Spain, four deaths were reported.



The fatalities in Portugal occurred in densely forested parts of central and northern part of the country after blazes broke out in "exceptional" weather circumstances, Civil Protection Agency spokeswoman Patricia Gaspar said.



The situation was still "critical" because of unseasonably high temperatures, Gaspar said. But cooler, wetter weather is approaching, which may give some respite to firefighters tackling the blazes.



In addition to the 27 dead, 51 people have been injured, including 15 in serious condition, Gaspar said. She also said that an unknown number of people were still missing.

Residents walk past a burnt bus as a wild fire moves forward in Chandebrito, Pontevedra, in the northwestern Spanish region of Galicia, Spain, Oct. 16, 2017. AP

Later, Portuguese media reported the death toll had risen to 31. Civil protection officials couldn't immediately be contacted to confirm the new total.



Portugal has been especially hard-hit by wildfires this year, including one that killed 64 people in June. An independent investigation into those fires found last week that authorities failed to evacuate villages on time. The fire destroyed about nearly 72,000 acres.



A prolonged drought and mid-October temperatures of more than 86 F have fueled the recent spate of blazes.



Across the border in Spain, some 105 fires were reported in the northwestern Galicia region. Authorities said that four people had died, two of them trapped in a car. Thousands of people have been evacuated.

Residents hold their pets as a wild fire moves forward their houses in As Neves, Pontevedra, in the northwestern Spanish region of Galicia, Spain, Oct. 16, 2017. AP

Spain's prime minister said the deadly wildfires were set intentionally and he urged police to find the arsonists.

Mariano Rajoy spoke while visiting a firefighting coordination center in Pazos de Borben, saying "what we are seeing here doesn't happen accidentally. This has been provoked."

The prime minister said he had instructed Civil Guard and National Police officers to prioritize the arrests of those responsible for the fires.

Get Breaking News Delivered to Your Inbox

Regional president Alberto Nunez Feijoo also blamed arsonists for causing most of the blazes earlier Monday. He said "Galicia is fed up" with being attacked by arsonists who make the most of weather conditions, adding that some purposely tried to cause most damage by targeting urban areas.

Feijoo says 15 of the fires are posing a risk to towns. He added that 90 percent of forest fires each year in Galicia are intentional.



He told reporters: "All of Galicia is weeping this morning for our razed hills, but especially for the loss of human lives."



Many of the fires were close to inhabited areas. Schools were closed Mondayand at least 20 planes were joining 350 firefighting units in tackling the blazes. Light rainfall was expected to help extinguish the flames.



Spanish Prime Minister Marian Rajoy, who is from Galicia, traveled to the region Monday to visit an emergency response center.