A suicide bomber struck on Monday inside a mosque in the northwestern Pakistani city of Peshawar, killing at least 34 people and wounding 150, officials said.
Most of the casualties were police officers as the targeted mosque is located within a sprawling compound, which also serves as the city's police headquarters.
Sarbakaf Mohmand, a commander for the Pakistani Taliban, claimed responsibility for the attack on Twitter. The main spokesman for the militant group was not immediately available for comment.
More than 300 worshippers were praying inside the mosque, with more approaching, when the bomber set off his explosives vest. Many were injured when the roof came down, according to Zafar Khan, a local police officer.
Rescuers scrambled to remove mounds of debris from the mosque grounds to reach worshippers still trapped under the rubble, police said.
Meena Gul, who was inside the mosque when the bomb went off, said he doesn't know how he survived unhurt. The 38-year-old police officer said he could hear cries and screams after the bomb exploded.
Siddique Khan, a police official, said the death toll rose to 34, and the dead included Noor-ul-Amin, the prayer leader. He said the attacker blew himself up while among the worshippers.
Peshawar police chief Ijaz Khan said at least 150 were wounded. A nearby hospital listed many of the wounded in critical condition, raising concerns the death toll could still rise.
The police compound is located in a high-security zone in Peshawar, along with several government buildings, and it was unclear how the bomber managed to penetrate so deep inside the zone unnoticed.
Prime Minister Shahbaz Sharif in a statement condemned the bombing, and ordered authorities to ensure the best possible medical treatment to the victims. He also vowed "stern action" against those who were behind the attack.
Former Prime Minister Imran Khan also condemned the bombing, calling it a "terrorist suicide attack" in a Twitter post.
"My prayers & condolences go to victims' families," said the ex-premier.
"It is imperative we improve our intelligence gathering & properly equip our police forces to combat the growing threat of terrorism."
Peshawar is the capital of the Khyber Pakhtunkhwa province bordering Afghanistan and has been the scene of frequent militant attacks.
The Pakistani Taliban, are known as Tehreek-e-Taliban Pakistan or TTP, and are separate group but also a close ally of the Afghan Taliban, who seized power in neighbouring Afghanistan in August 2021 as US and NATO troops were in the final stages of their pullout from the country after 20 years of war.
The TTP has waged an insurgency in Pakistan over the past 15 years, fighting for stricter enforcement of Islamic laws in the country, the release of their members who are in government custody and a reduction of the Pakistani military presence in the country's former tribal regions.
Pakistan has witnessed a surge in militant attacks since November when the Pakistani Taliban ended their ceasefire with government forces.
The truce ended as Pakistan was still contending with last summer's unprecedented flooding that killed 1,739 people, destroyed more than 2 million homes, and at one point submerged as much as one third of the country.
The flood damages totalled to more than $30 billion and authorities are now, months later, still struggling to arrange tents, shelter and food for the survivors.
Cash-strapped Pakistan is currently also facing one of the worst economic crisis and is seeking a crucial installment of $1.1 billion from the International Monetary Fund (IMF) – part of its $6 billion bailout package – to avoid default.
Talks with the IMF on reviving the bailout have stalled in the past months.
Sharif's government came to power last April after Imran Khan was ousted in a no-confidence vote in Parliament.
Khan has since campaigned for early elections, claiming his ouster was illegal and part of a plot backed by the United States. Washington and Sharif have dismissed Khan's claims.