MANILA — A week and a half after the Philippines suffered a deadly hit from a super typhoon, another storm battered the country overnight into Thursday, cutting power to millions and leaving at least 39 dead and 22 missing, according to the military. Countless others were stranded, and by Friday authorities said they had rescued more than 138,000 people.

Typhoon Vamco, the equivalent of a Category 2 hurricane, struck the northern island of Luzon, the third typhoon and fifth tropical cyclone to affect the Philippines in less than three weeks.

Super Typhoon Goni narrowly sidestepped the capital region of more than 12 million this month, but Vamco brought rain and winds of up to 105 mph Wednesday night into Thursday. The Philippine Atmospheric, Geophysical and Astronomical Services Administration issued a Signal 3 warning, on a 1 through 5 scale, for much of Luzon, including the Manila metropolitan area.

The consecutive storms present double trouble for the Philippines’ overcrowded evacuation centers — usually tent setups in gyms and schools — as the coronavirus continues to spread. The country surpassed 402,000 cases this week, the second-highest number in Southeast Asia.

On Thursday, houses were submerged and Filipinos were stranded on rooftops. The hashtag #RescuePH trended on social media, with people posting their whereabouts and contact details, begging for help. Many were stranded with the elderly, children and pets. Some were rescued on rubber life boats; in one video, a child was floated out in a basin.

In the capital region, a river cutting through Marikina City swelled, forcing residents to seek higher ground. A steel bridge swept away by floodwaters lodged against an elevated roadway outside a mall. A ship rammed into another bridge north of Manila.

A Marikina resident, Lester Abuel, said that after the river rose by more than three feet in less than an hour, he and his parents began packing up. At 5:30 a.m., they left with the clothes on their backs and some supplies — but the damage proved to be far worse than they expected.

“Looking at the photos and videos in our Facebook village group, we knew that there wouldn’t be anything to salvage after,” he said. “It was gut-wrenching to see the calls for help.”

The Manila Electric Company said almost 2 million households — a fifth of its base — still had no electricity at midday Thursday.

As residents assessed the toll, the phrase #NasaanAngPangulo, or "Where is the president?," began trending on Twitter. Rodrigo Duterte, the country's populist leader, appeared to answer that question in a short video broadcast, saying the government was on top of the situation.

He added that his security detail was preventing him from going out. “It’s not that I am at a distance from you,” he said. “I want to go there and swim with you, but I am being stopped. Because if I die, there’s only one president.”

In the eastern Philippines, which faces the Pacific Ocean, communities have not fully recovered from the battering storms over the past three weeks.

In Naga City, the power grid had been partially restored when Vamco struck, causing blackouts again, said Marion Legacion, a volunteer organizer and the mayor’s wife. The area suffered uprooted trees, flooded neighborhoods and waterlogged crops.

“As far as morale is concerned, the fear is there,” she said, “but we have to fight.”

On the island of Catanduanes — where Goni made landfall this month and felled communication lines have not been fully restored — a road that was recently cleared was blocked by debris again. A storm surge of between seven and 10 feet was forecast.

“I’m so exhausted,” a resident, Shirley Tapel, told broadcaster ABS-CBN. “We clean up and prepare . . . then suddenly there’s a new storm. We have to pack up and move again.”

ABS-CBN, whose regional network reached millions of viewers, was taken off free television this year in a move that journalists decried as politically motivated. Analysts and government critics say its closure left a communication gap in the disaster-prone country.

Casiano Monilla, assistant secretary of the Office of Civil Defense, said in an online news conference Thursday that the government was “not caught flat-footed” by the disaster but could not immediately provide figures for preemptive evacuations or answer questions about shortcomings in preparedness.

“It’s not time for us to point fingers. Sorry to say that, but we are focusing now on the conduct of the rescue operations,” said Monilla.

Mahar Lagmay, executive director of the University of the Philippines’ Resilience Institute, said the weather forecast may have been accurate but that an efficient warning system required much more. With the worsening climate crisis and floods inundating more areas, he said, the government needed to map unprecedented dangers and clearly communicate them to residents.

“We have to prepare [for] hazards that are bigger than what we remember and what we experienced,” Lagmay said. “If we do not, when it comes, when they are bigger, people will get surprised.”

By Thursday afternoon, Vamco was leaving the Philippines over the South China Sea. Its passage over Luzon weakened the storm, whose peak winds dropped to the level of a Category 1 hurricane. Vamco is projected to move west and come ashore in Vietnam on Saturday.

Matthew Cappucci and Jason Samenow in Washington contributed to this report.