The siren on the hillside above Hassanabad went off at 3:40 a.m. on Sept. 29, and within 20 minutes 1,300 people had walked uphill in the dark to the schoolyard that serves as the village’s assembly point. The flood that followed from the Shisper glacier’s lake took out a footbridge and two water channels. No one was hurt.

That outcome, which officials here describe as a success, has become the standard against which Pakistan’s northern territories measure a threat that is growing faster than their ability to engineer it away. The Pakistan Meteorological Department now classifies 36 glacial lakes in Gilgit-Baltistan and Chitral as potentially dangerous, up from 15 in 2016. An outburst flood from one of them, known by the acronym GLOF, can send several million cubic meters of water and debris down a valley in under an hour.

The warning system that saved Hassanabad was built under a United Nations-backed program that has installed 32 automated weather stations, 24 lake-level sensors and sirens in 16 valleys since 2019, at a cost of about $37 million. Each station transmits readings by satellite to a control room in Gilgit, where a duty officer can trigger alarms. The program’s second phase, due to end next year, has yet to secure financing for the four years beyond.

“We can now give people 30 minutes. Ten years ago we gave them nothing,” said Rehmat Ali Baig, the territory’s director of disaster management. “But 30 minutes does not save a house, a bridge or an orchard. It saves lives, and then the village has to begin again.”

Pakistan has more glacial ice than any country outside the polar regions, more than 7,000 glaciers, and the Karakoram has been warming at roughly twice the global rate, according to the meteorological department. Hassanabad, on the Karakoram Highway, has flooded four times since 2018. After the 2022 flood destroyed a highway bridge, the village built stone embankments and moved 40 households to higher ground with a government grant; the September flood overtopped one embankment.

Residents describe a form of exhaustion. Gul Bano, 47, who runs a guesthouse and apricot orchard, has evacuated six times. “The first time, we carried everything. Now we carry the children and the documents,” she said. “The rest, we have decided, belongs to the glacier.”

Engineers say the only durable fix for the most dangerous lakes is to drain them, as Nepal and Peru have done by cutting spillways through moraine dams. A feasibility study for the Shisper lake, completed in June, put the cost at about 2.8 billion rupees, or $10 million, and found that the lake re-forms each spring behind an advancing glacier, making any channel temporary. The territory’s annual disaster budget is 1.1 billion rupees.

In Hassanabad, the siren has been reset. Mr. Baig said the next test would be a scheduled drill at the end of October, held during school hours so that the children know the route. “They know it better than the adults,” he said. “That is both the good news and the sad news.”