BBC Urdu
Reporting fromQuetta
Gavin Butler
BBC News
Reporting fromSingapore
AFP
More than 400 people were on the train when it was attacked
Mehboob Hussain was riding the train home on Tuesday when the tracks under the front car exploded.
In the depths of central Pakistan's Bolan Pass, a pocket of wilderness so remote that there is no internet or mobile network coverage, the nine-coach Jaffar Express ground to a halt. Then the bullets started flying.
"I was a passenger on the train that was attacked," Mr Hussain told BBC Urdu.
He, along with some 440 others, had been travelling from Quetta to Peshawar through the heart of the restive Balochistan province when a group of armed militants struck – they bombed the tracks, fired on the train and then stormed the carriages.
The Balochistan Liberation Army (BLA) quickly claimed responsibility for the siege, and threatened to kill many of those on board if Pakistani authorities did not release Baloch political prisoners within 48 hours.
The group, which many countries have designated a terrorist organisation, has waged a decades-long insurgency to gain independence for Balochistan, accusing Islamabad of exploiting the province's rich mineral resources while also neglecting it.
BLA militants have a long history of attacking military camps, railway stations and trains in the region.
But this was the first time they had hijacked one.
The siege lasted over 30 hours. According to authorities, 300 passengers have now been freed, and 33 BLA militants, 21 civilian hostages and four military personnel were killed. But conflicting figures suggest many passengers remain unaccounted for.
Information relating to the attack and the subsequent rescue operation has been tightly controlled throughout.
But the BBC was able to speak to multiple eyewitnesseses who described the "doomsday scenes" on board the train as the attack unfolded.
As Ishaq Noor told BBC Urdu of those first few moments: "We held our breath throughout the firing, not knowing what would happen next."
A gunfight
A railway police officer who was on board the train told BBC Urdu that, contrary to initial reports from Pakistani authorities, the train was "not in a tunnel but in an open area" when it was hit.
The BLA has also released an alleged video of the moment the train was struck by the blast. It shows an open section of track that runs along the base of a large rocky slope.
Atop that slope, according to the video, is a cluster of BLA fighters.
The officer described to the BBC how he initially "fought together with other police officers" to try and hold off the militants until "the ammunition ran out".
"They [the BLA] were moving in front of us on the mountain and they were much more numerous than us, in the hundreds," the officer, who spoke on condition of anonymity, recalled. He noted that he was accompanied by four railway police and two members of Pakistan's paramilitary Frontier Corps (FC).
At least 100 of those on the train were members of the security forces, according to Pakistani officials.
Reuters/Hakkal Media
The BLA released footage of what it says was the moment its fighters attacked the train
"I told my companion to give me the G-3 rifle because it is a better weapon," the officer explained. "When I got the rifle and the rounds, we also started firing back. I used to fire one shot at a time at them so that they could not come near us and the train... [But] in an hour-and-half, our rounds were over... We were helpless."
When the gunfire from those on board the Jaffar Express ceased, the militants came down from the surrounding mountains and started taking passengers off the train, the officer said.
"They started checking cards and telling people to go this way, this way," he said, explaining that the hostages were separated into groups alongside the train, according to their ethnicity.
The militants were speaking in the Balochi language, he added, and declared, "We have made demands to the government and if they are not met, we will not spare anyone; we will set the vehicle on fire".
The officer claimed the militants were receiving orders: "They would get orders to kill, and they would pick up people from the group and kill them. They killed many people - both army personnel and civilians."
The first release
Some passengers, however, were allowed to leave unharmed – including women, children, the elderly and those who lived in Balochistan, according to Mr Noor.
Among those released was Noor Muhammad. He said that when the initial volleys of gunfire stopped after an hour, armed men forced open the door to the train and entered, saying "get out or we will shoot you".
Mr Muhammad said he was escorted off the train, and when he told the militants his wife was still in the back of the car, they brought her out too. Then they "told us to go straight and not look back".
The couple walked through the wilderness, he said, and with "great difficulty" reached Panir Railway Station at about 7pm, where they rested.
His wife recalled the moment the Pakistan military arrived to meet them.
"They told me, 'ma'am, come inside with us, we will take you home safely,'" she said. The soldiers took the couple to the town of Machh, she added, "and then we reached Quetta to our children, who were waiting for us".
Some passengers who managed to leave the train late on Tuesday evening said they walked for nearly four hours to reach the next railway station. They included Muhammad Ashraf, who had been riding the train to Lahore to visit his family.
"We reached the station with great difficulty," he told BBC Urdu, "because we were tired and there were children and women with us."
Shots in the night
As night descended over the Jaffar Express, scores of BLA militants began to depart, according to the police official who did not wish to named.
"Many of them hugged each other and 70, 80 people left while 20, 25 stayed behind," he said.
At about 10pm, he recalled, violence erupted again.
"Some people tried to run away, they [the BLA] saw them and opened fire, then everyone fell to the ground," the official said.
Mr Mehboob similarly recalled gunfire throughout the night – and said that at one point, a person close to him, who had five daughters, was shot.
"When someone is killed in front of your eyes, you don't know what to do," he said.
Another passenger, Allahditta, said his cousin was killed in front of him by the BLA. He said his cousin was pleading to the militants to not kill him as he had young daughters but "his life was not spared".
The BBC on Wednesday saw dozens of wooden coffins being loaded at Quetta railway station. A railway official said they were empty and being transported to collect casualties.
Morning escape
It was during the time of morning prayer on Wednesday that rescuers from the FC started firing on the BLA militants, Mr Allahditta said.
Amid the sudden chaos, he and others broke free.
"When the FC opened fire at the time of the Fajr call to prayer, we escaped from the militants," Mr Allahdita said.
The police official similarly recalled the moment when the FC moved in, briefly diverting the BLA militants' focus away from the hostages.
"When the FC arrived in the morning, the attention of these people turned to this direction," the official said. "I told my companion, 'Let's try to run away.'"
Militants fired on the escapees as they fled, and the official said his companion was hit from behind.
"He told me to let go of him. I said no, I'll carry you on my shoulder. Then another person also joined hands and we went down the hills and out of firing range."
Mr Mehboob, Mr Allahdita, the police official and his companion all managed to escape the Jaffar Express alive as the FC attacked the militants.
Military and paramilitary troops and helicopters had surrounded the stranded train since Tuesday. On Wednesday, they killed the hostage-takers and cleared the site, according to a military spokesperson.
Authorities said there were 440 passengers on the train - and 300 of them have been freed. But it's still unclear what happened to the remaining 140. Reuters and AFP quoted an unnamed security official who said some miliants had left, taking an unknown number of passengers with them.
The military says it is still working to find passengers who escaped and fled into the surrounding area, and insists that any others involved in the hijacking would be brought to justice.
Mr Noor, who is now distributing alms and charity in his hometown along with his wife, is just grateful to have escaped the situation with his life.
"Thank God," Mr Noor said. "He saved us."