Pakistani teenager Zaheerullah owes his life to the crush of people crowding into his local mosque for Friday prayers.
Minutes later a suicide bomber reduced the mosque to rubble, killing at least 50 and wounding scores of others in one of Pakistan's bloodiest attacks of recent months.
But Zaheerullah, who goes by one name, wasn't in the building at the time.
"I'm safe because I couldn't get a place to pray inside the mosque. Instead, I found a place near the stairs outside," he told AFP.
"The sound of the blast was so huge that I lost senses for quite some time. It was just a miracle that I remained unhurt."
He estimated there were around 170 people in the building when the suicide bomber detonated the explosives.
Blood-soaked caps, shoes and shirts littered the ground near the flattened mosque in this northwest town in the tribal district of Khyber, fabled for its lawless mountains on Pakistan's border with Afghanistan.
Rescue workers dug through the rubble, splashed with pools of blood, as wild-eyed survivors staggered around, dazed with shock.
Only two minarets of the mosque were left intact by the massive explosion which ripped through the crowded prayer room during the main Friday prayers.
The mosque is frequented by tribal police and paramilitary officers -- a regular target for Islamist extremists.
Volunteers covered body parts with rags and ferried corpses away in dirty blankets and on cane stretchers, lugging them up the steep hillside.
An AFP correspondent saw a raw, bloodied leg sticking out of the rubble.
Ambulances screeched back and forth with dead bodies and wounded people, covered in blood and crying in agony for treatment at hospitals in the nearby city of Peshawar, said an AFP photographer.
Pakistani policeman Waheed Khan was on duty across the road when the bomb exploded.
"I was listening to the imam who was to lead the prayers," he told AFP as rescue workers scrambled to pluck bodies out of the bloodied debris.
"He advised worshippers to get in queue because he was going to begin.
"At the same time that the imam said 'Alluh Akhbar' (God is greater), the suicide bomber exploded. It was a huge explosion. Even the vehicles standing outside the mosque were damaged."
Khan, who was one of three tribal policemen posted across the road and not in the mosque, said he had never seen anything like it.
"People were crying. I haven't seen such devastation in my life."
The main congregation at the mosque, which is located near a tribal police checkpoint, are police and paramilitary troops from the Khyber Rifles, deployed in the area as part of an offensive against Taliban and Islamist militants.
"Usually there are 115 tribal policemen on duty, and today the number was more than 100. They were participating in the mosque," said Khan.