PESHAWAR, Pakistan — Minutes after walking his teenage son to the cable car he takes to school Tuesday, Umraiz Khan said, he heard a loud noise followed by the sound of people screaming.

Running back down to where he had left Irfan, 14, he said he saw the cable car dangling around 900 feet above the deep valley in the remote, mountainous region of Pakistan where they live. Two of its three cables had snapped.

Its eight terrified passengers, seven of them schoolchildren ages 9 to 15, were huddled inside, swinging at a 45-degree angle above the forests below.

“It was a huge shock for me, as my son and his classmates were between life and death,” Khan told NBC News from his village of Jhangrai in Pakistan’s Battagram region, around 150 miles north of the capital, Islamabad.

Army commandos using helicopters and a makeshift chairlift rescued eight people from a broken cable car dangling hundreds of meters (feet) above a canyon Tuesday in a remote part of Pakistan, authorities said. (Nazir Mahood / AP)

What followed was a gripping, 12-hour rescue mission watched by television audiences around the world, involving commandos rappelling from helicopters, high winds and the constant fear that the final cable would sever.

ADVERTISEMENT Advertisement

“Don’t ask me how we got through those long hours,” Khan, who is in his 60s, said. “Helplessly looking at near and dear ones from the ground, you don’t know what will happen to them."

Taking a cable car or chairlift to school or elsewhere isn’t uncommon in this part of Pakistan. Basic versions of this mode of transportation are used to bypass the winding roads and tracks that would take hours to traverse the majestic but impenetrable terrain.

There have been similar accidents in the past, Amir Tareen, commissioner of the local Hazara region in the Khyber Pakhtunkhwa province, said after leading the “risky” mission. This car's cables snapped at 7 a.m. local time Tuesday (10 p.m. ET Monday), while the group was halfway across.

Army commandos using helicopters and a makeshift chairlift rescued eight people from a broken cable car dangling hundreds of meters (feet) above a canyon Tuesday in a remote part of Pakistan, authorities said. (Inter Services Public Relation / via AP)

The only adult among those trapped, Gul Faraz, 20, conveyed their terror in a phone call to local TV channel Geo News as the cable car was still swinging in the air. “Our situation is precarious, for God’s sake, do something,” he said.

An estimated 8,000 people had gathered on the hillsides to watch the rescue operation, The Associated Press reported.

The army was mobilized, and commandos rappelling from a helicopter tried several times to extract those inside the car. However, high winds made this more difficult, exacerbated by the powerful gusts from the helicopter’s own rotor blades.

It was a painstaking operation, and finally just before sunset the helicopter managed to rescue one child — Irfan.

The other seven were still stranded as night fell.

Faraz later said he had no idea their perilous situation had garnered so much attention on TV.

“We didn’t believe people in the entire world were watching us and praying for our safe rescue,” he said. “When we were passing through middle of the valley, one of the chairlift’s ropes broke down. The chairlift lost its balance and overturned and we thought it would fall down to the ground.”

Pakistan cable car incident (Prateek Kumar / AFP - Getty Images)

“There was so much anxiety and the parents were so worried all day,” Tareen said.

Rescues such as these are “very complicated, and it’s painful, but you have to take it slow,” said Thomas Coyne, a survival and emergency medical care instructor based in Irvine, California. “You have got to suck it up as the rescuer. You have got to realize we have to take it slow, because that will make for the best outcome.”

Hampered by the darkness, the army switched to a different tactic: Constructing a pulley system and winching out the remaining survivors by hand, one by one. The AP reported it built this mechanism using a wooden bed frame.

“At the end, when the helicopter operation could not go on in the dark, I think the rescuers made this brave decision because they didn’t want the kids to be waiting all night and the parents to be suffering from anxiety,” Tareen said.

Remarkably there were no injuries, although one of the children fainted and was unconscious for a time.

On Wednesday, police arrested Gul Zarin, the owner of the cable car, on charges of ignoring safety measures, police said.

But the jubilation over the rescue's success matched the previous anxiety.

“It was dangerous” but the successful result, made “the families very happy,” Tareen said. “Everyone got really excited when they saw the kids going to their parents.”

Mushtaq Yusufzai reported from Peshawar, Pakistan, and Alexander Smith from London.

This article was originally published on NBCNews.com