Six children and two teachers have been rescued from a chairlift dangling 274 metres over a valley in northwest Pakistan, authorities said.
The eight of them had been travelling to school in the car when the cable broke about 9am on Tuesday (2pm AEST) leaving them stranded hundreds of metres above a river canyon in the Battagram district in Khyber Pakhtunkhwa province, a remote part of Pakistan.
Caretaker Prime Minister Anwaar-ul-Haq Kakar congratulated the military and other rescuers for the success. The dramatic effort transfixed the country for hours as Pakistanis crowded around televisions in offices, shops, restaurants and hospitals.
"Relieved to know that ... all the kids have been successfully and safely rescued," Kakar said on X, the service formerly known as Twitter.
"Great team work by the military, rescue departments, district administration as well as the local people."
Because helicopters could not fly after sunset, rescuers eventually shifted from an airborne effort to a risky operation that involved using one cable that was still intact to approach the car with the chairlift.
Footage on TV stations showed a child in a harness being pulled to safety. The commandos' rope could be seen swaying in the wind against the mountainous landscape.
Two of the children were plucked from the cable car by helicopter more than 10 hours after they first became trapped, while two others were rescued by local zipliners, Pakistani rescue services spokesman Bilal Ahmed Faizi told CNN.
A military source said two had been rescued by the Special Service Group, a special forces unit of the Pakistani army.
"Two kids were rescued by the heli(copter) and two were rescued by the efforts of local zipliners. The remaining four in the cable car have been given food and water. The four rescued are being taken care of by health services on the ground," Faizi said. "An operation for rescue is still underway."
Footage released by the rescue services captured the dramatic moment when one child appeared to jump from the cable car while holding onto the end of a rope dangling from a helicopter before being flown to safety.
Another video provided by the rescue services showed locals and emergency workers using ropes to reel in another person attached to a platform by a harness.
An expert described the helicopter rescues as extremely delicate because the wind generated by the helicopter blades could further weaken the remaining cables holding the car aloft.
As the rescued children were handed over to their families, most burst into tears, said Nazir Ahmed, a senior police officer who was present in the area where the air and ground rescue mission was launched.
"Everyone was praying for this moment," he said.
Two of the students on the chairlift were reportedly slipping in and out of consciousness, one of the passengers told Pakistani media outlet Geo News earlier. The passenger, named only as Gulfaraz, had urged state authorities to take action. He said that the students, aged between 10 and 15 years old, didn't even have drinking water.
"People in our area are standing here and crying," Gulfaraz said.
Rescue personnel gave the passengers nausea medication following reports of children vomiting, Ur Rehman said, adding that those trapped were also given heart related medication.
According to Pakistani TV stations, some of those trapped were in contact with their families by mobile phone, while authorities said the two adults were consoling the children, who were between the ages of 11 and 15.
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 metres 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, the service formerly known as Twitter, that he had ordered safety inspections of the country's cable cars and chairlifts.
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."
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.