Typhoon Mangkhut was nearing Hong Kong and the southern coast of China on Sunday, after cutting a destructive path through the Philippines and killing dozens of people there. The storm had weakened overnight but was still a severe typhoon, with gusts of up to 120 miles an hour, the Hong Kong authorities said.

The storm was expected to pass about 60 miles south of Hong Kong before moving on to China’s heavily populated Guangdong Province. Hong Kong’s weather agency warned that Victoria Harbour could see storm surges of almost 10 feet.

In the Philippines, officials said Sunday morning that the death toll from the storm had risen to 25. But despite the suffering, there was relief there that the devastation had not been much worse.

[Catch up on the rest of our storm coverage.]

Mangkhut was moving relatively quickly across the South China Sea and was on track to pass south of Hong Kong Sunday afternoon before barreling into southern China’s Guangdong Province by the evening.

Winds had weakened but forecasts said it would still pack the power of a Category 2 storm when it made landfall, possibly near Maoming, a big petrochemicals center.

The area has relatively few low-lying towns that would be vulnerable to storm surge as the typhoon makes landfall, and Guangdong, China’s most populous province, has extensive experience with typhoons, and makes elaborate preparations for each of them.

Evacuations of low-lying areas are mandatory. Fishing vessels are ordered into well-protected anchorages. After 16 workers were killed when their shanty collapsed in a typhoon in 2003, the province pursued a strenuous campaign of demolishing or upgrading substandard housing.

If Mangkhut shifts course slightly to the north, though, it could hit Hong Kong and the Pearl River Delta area, one of the world’s most important manufacturing hubs and home to more than 60 million people.

Hong Kong itself is quite resilient to typhoons. Although heavy rain may trigger landslides, the former British colony is not especially vulnerable to flooding because it has few low-lying areas.

The sprawling river delta around it, however, is barely above sea level and has struggled with flooding despite years of investment in drainage systems. Climate change has exacerbated the problem. The provincial capital, Guangzhou, has more to lose from rising seas and more severe storms than any other city on the planet, according to a World Bank report.

In Zhanjiang, a coastal city of 8 million on the storm’s path near Maoming, workers were boarding up storefronts on Saturday, while residents crowded supermarkets and emptied some of them of water, rice and packaged noodles.

At Yugang Beach, along a bay near the city center, a loudspeaker warned bathers to stay out of the water because of the “influence of the typhoon,” though few seemed concerned given the blue skies and warm temperatures. A woman selling chilled coconuts said she would simply stay home on Sunday.

Beside a rusting ferry ship nearby, groups of young men collected sand into large nylon sacks. One of them, Liang Jiawei, said they intended to use the improvised sandbags to brace the glass windows at the real estate office where they worked.

They recalled that Typhoon Mujigae, the last major typhoon to strike the city, in 2015, killed at least 11 people. “People have been preparing ahead of time because three years ago people were not prepared well,” Mr. Liang said.

Provincial authorities have issued a video on social media showing footage of the previous typhoon and warning people not to take any chances.

A top Philippine official, Francis Tolentino, said Sunday morning that at least 25 people had been killed, including a family of four caught in a landslide in their home in the Cordillera Mountains. Among the dead were two rescue workers killed in landslides, local news media reported.

The police said the body of one victim, a young girl, was found in the Marikina River in the eastern part of metropolitan Manila, though the densely populated capital region seemed to have been spared major damage.

The eye made landfall over Baggao in Cagayan Province and moved west across the country, hitting the opposite coast near Laoag City less than eight hours later.

[Here’s how to help support the recovery efforts.]

Videos posted by the Philippine Red Cross in the early hours of Sunday morning show rescue efforts in San Fabian, Pangasinan Province, on the western side of Luzon. Rescuers evacuated families from their homes on boats as the water had risen to neck deep levels in some areas.

The authorities said more than 105,000 people had taken shelter in evacuation centers as the typhoon was nearing. Much of the planning for Mangkhut was informed by lessons learned from Typhoon Haiyan, the devastating 2013 storm that killed 6,000 people and left more than four million homeless.

“Because of other typhoons, people have internalized the fact that they have to go to evacuation centers, so the process was quite smooth this time,” Mr. Tolentino said. “Some people wanted to stay with their farm animals, but if you have to choose between your life or your animals, you should choose your life.”

The New York Times reporters Hannah Beech and Kimberly dela Cruz traveled along Luzon’s western and northern coasts on Saturday. Foliage, trees and rolling coconuts were strewn across the roads, which were deserted except for volunteer crews removing debris to make them passable and the occasional emergency vehicle.

In one community after another, they reported seeing downed trees and badly damaged buildings. Signs, tin roofs and gates that had been torn free flew about.

In Claveria, a corn- and rice-growing area on the northern coast, the Antonio family had fled their home about 1 a.m. for sturdier shelter. Marck James Antonio, 24, stayed behind and was struck and gashed in the right temple by flying debris. But he was conscious and still moving around.

“This was the strongest and the worst storm that I’ve ever experienced in my life,” said his mother, Teresita Antonio, 54. “I was crying before because I don’t know how I will be able to afford to fix my house.”

“It was shaking like an earthquake,” said another resident, Robert Tumaneng, 55, a fish farmer. From a road above, the area where the fish ponds once were looked like a giant lake, with the tips of submerged palm trees and thatched roofs sticking out.

Further east, in Sanchez Mira, more than 270 people had sought shelter at a community hall.

“Some people didn’t want to evacuate their homes but I forced them,” said Rewin Valenzuela, 48, a local leader. “We evacuated everyone to prevent loss of life.”

The winds made it difficult to stand outdoors but some residents were returning home, carrying mattresses and plastic buckets with food and other provisions. The roofs had been torn off other houses and a few that were built on stilts listed dangerously.

The 12 million residents of the metropolitan Manila area, one of the world’s most densely populated cities, appeared to have been spared major destruction as the center of the storm passed hundreds of miles to the north.

The megacity was hit by heavy rain and strong winds, with trees uprooted and flooding in some areas. Among the inundated roads was Roxas Boulevard, a major artery that runs along Manila Bay and often floods during storms.

More than 1,600 families were evacuated after the Marikina River, which runs through part of the city, began rising quickly because of runoff from nearby mountains. The police said the body of a child, about 10 years old, was found floating in the river under a bridge in Pasig, one of several cities that make up Metro Manila.

The Manila area sits near sea level on the shore of Manila Bay, making it vulnerable to the typhoons that sweep in from the Pacific.