An official says military commandos have rescued two children stuck in a cable car dangling hundreds of meters above the ground in a remote part of Pakistan.

Military commandos launched a helicopter operation to free the trapped occupants — six children and two adults — yesterday, said Bilal Faizi, spokesman for the emergency services.

He said the first two children have been rescued and the operation is still underway.

Army commandos could be seen on local TV trying to lower themselves on ropes from the choppers toward the cable car. An expert warned the rescue was incredibly delicate because the wind created by the helicopters’ blades could further weaken cables holding the car aloft.

Relatives of those trapped prayed while anxiously watching the operation unfold. The rescue has also transfixed Pakistanis across the country who crowded around televisions in offices, shops, restaurants and hospitals.

According to Pakistani TV stations, some of those trapped were in contact with their families by cell phone, while authorities said the two adults were consoling the children, who were between the ages of 11 and 15.

One of the cables snapped while the eight people were crossing a river canyon in Battagram district in Khyber Pakhtunkhwa province. The children had been on their way to school, and villagers frequently use cable cars to get around Pakistan’s mountainous regions. But the cars are often poorly maintained and every year people die or are injured while traveling in them.

Helicopters were sent to attempt to pluck the people from the cable car — but only after the group spent six hours precariously suspended 350 meters above ground, according to Taimoor Khan, a spokesman for the disaster management authority.

Pakistan’s caretaker prime minister, Anwaar-ul-Haq Kakar, wrote on X that he ordered authorities “to urgently ensure safe rescue and evacuation of the 8 people.”

“I have also directed the authorities to conduct safety inspections of all such private chairlifts and ensure that they are safe to operate and use,” he said on the platform formerly known as Twitter.

Several helicopters hovered above the scene, and ambulances gathered on the ground.

Tipu Sultan, a retired army brigadier and defense expert, warned that the helicopters themselves could make the situation worse but that the commandos would be well aware of that risk. Khan added that the pilots were flying “carefully.”

“Let us pray that those trapped in the cable car are safely rescued,” Sultan said.

In 2017, 10 people were killed when a cable car fell into a ravine hundreds of meters (feet) deep in the popular mountain resort of Murree after its cable broke. RIAZ KHAN, PESHAWAR, MDT/AP