MADRID — A raging forest fire enveloped a stretch of road in central Portugal, killing at least 30 motorists who were trapped in their cars.

The fire, which is still burning, has left more than 60 people dead in the area, the Portuguese government said on Sunday.

Prime Minister António Costa described the blaze in the Pedrógão Grande area as “the worst tragedy in terms of human lives that we’ve known in recent years.”

Firefighters working to stop a forest fire from reaching the village of Avelar, in central Portugal, on Sunday. CreditArmando Franca/Associated Press

Jorge Gomes, the secretary of state for internal administration, said that at least 30 people had died in their cars, hemmed in by the flames while driving along a road between Figueiró dos Vinhos and Castanheira de Pera through the densely forested area where the fire started..

A 4-year-old child was among the dead, according to TVI, a local television channel. The national television broadcaster and Lusa, the national news agency, quoting Mr. Gomes, said on Sunday that the death toll stood at 62. Officials said they expected the number to rise.

Portugal on Sunday declared three days of national mourning.

Planes were deployed to fight the blaze in central Portugal. CreditArmando Franca/Associated Press

Several houses were destroyed by the flames. Portuguese television showed people scrambling to leave their homes in the early hours of Sunday morning, escorted by firefighters and other rescue teams. Huge flames engulfed hamlets around the area.

By noon on Sunday, about 1,600 firefighters were battling five fires in different parts of central Portugal with the support of firefighting planes, as well as units of the police and the military. At least 900 firefighters were focusing on the Pedrógão Grande area, where a deadly blaze started on Saturday. It was unclear whether any of the other fires had also claimed victims.

Burned cars on a road near a forest fire in Figueiro dos Vinhos, Portugal, on Sunday. CreditRafael Marchante/Reuters

Eleven districts were under surveillance on Sunday because of an extreme fire risk. And firefighters were trying to prevent fires from spreading to more houses. European Union officials in Brussels said on Sunday that they had activated the bloc’s civil protection mechanism to send reinforcements to Portugal. Spain also sent two planes to help contain the fire.

The cause of the fire Pedrógão Grande area was not immediately clear. Officials suggested that it had been spurred by a dry thunderstorm, in which lightning strikes but there is no rainfall.

A firefighter helped a woman on the side of the road near a fire in Pedrógão Grande on Saturday. Many drivers died after being trapped in their vehicles.CreditPaulo Cunha/European Pressphoto Agency

Portugal has been hit regularly by devastating summer forest fires, and the nation and the rest of the Iberian Peninsula have been suffering a heat wave for several days, with temperatures climbing above 40 degrees Celsius, or 104 Fahrenheit, in several regions.

José Maria de Almeida Rodrigues, the national director of Portugal’s judicial police, told Lusa on Sunday, “Everything points very clearly toward natural causes.”

Portugal declared three days of national mourning. CreditPaulo Cunha/European Pressphoto Agency

Patrícia De Melo Moreira, a photographer for Agence France-Presse based in Lisbon, reached the fire area around 3 a.m. on Sunday and accompanied firefighters close to the road where drivers were stranded.

“They were just trying to control the fire and stop it from spreading because it was just so huge,” she said by telephone. “Many clearly died in their cars, and the road was completely destroyed, melted.”

Later in the morning, the police sealed off the perimeter around the fire. Ms. De Melo Moreira then crossed into nearby villages, whose residents had been alerted to the advancing fire.

“People are just standing outside, staring, trying to see if the fire could be getting closer to their houses,” she said. “Everybody is very worried, but also pretty calm.”

Firefighters resting near a wildfire in Penela, in the Coimbra District of Portugal on Sunday. Several hundred firefighters, along with 160 vehicles and planes, were sent to tackle the deadly blazes. CreditPatricia De Melo Moreira/Agence France-Presse — Getty Images

President Marcelo Rebelo de Sousa paid tribute to the firefighters early on Sunday, saying they faced the toughest conditions possible: “temperature, wind and zero humidity.”

He spoke of the “human warmth” and solidarity displayed by people caught in the tragedy, and sent a message of “gratitude, comfort and support to all those who have been doing the best that they can.”

Last August, Portugal was also hit by devastating fires, including on the Madeira islands in the Atlantic, where the flames reached the main city, Funchal.

Prime Minister António Costa of Portugal on Sunday called the blaze “the worst tragedy in terms of human lives that we’ve known in recent years.”CreditPatricia De Melo Moreira/Agence France-Presse — Getty Images