Islamabad, Pakistan CNN — 

After a 14-hour ordeal, all eight people, including six children and two adults, who were stranded on a cable car dangling hundreds of feet over a valley in northwest Pakistan have been rescued, the country’s caretaker Prime Minister Anwaar ul Haq Kakar said in a statement.

“Relieved to know that Alhamdolillah all the kids have been successfully and safely rescued. Great teamwork by the military, rescue departments, district administration as well as the local people,” he said in the statement posted on X, formerly called Twitter.

The rescue began on Tuesday morning local time after six children and two teachers were travelling to school in the province of Khyber Pakhtunkhwa when one of the gondola’s cables snapped, leaving them stuck some 900 feet above a valley, officials said.

The rescue included helicopters and the use of zip lines, officials say. But as night fell, Pakistani authorities were forced to pause helicopter rescues of the remaining children and adults.

The cable car was traveling between the villages of Btangi and Jhengarie and had made multiple trips on Tuesday before the cable snapped, said Tanveer Ur Rehman, deputy commissioner of Battagram district, who added that strong winds had thwarted earlier attempts to reach those trapped. CNN