Dozens of police officers are thought to have died in a powerful bombing that Pakistan’s prime minister described as an “unimaginable human tragedy”.
The death toll quickly rose to at least 59 in one of the country’s deadliest attacks in years at a crowded mosque in the city of Peshawar.
The intense blast occurred inside a high-security zone next to a police headquarters, and most of the dead were members of the force, officials told the DPA news agency.
It happened during busy Monday afternoon prayers when some 300 people were said to have been packed into the mosque.
The Pakistani Taliban, known as Tehreek-e-Taliban (TTP), claimed responsibility for the attack near the border with Afghanistan.
The Taliban said it was in “revenge” for the death last year of one of their militants, Khalid Khorasani.
The Pakistani Taliban has killed about 80,000 people in decades of violence.
Pakistan Prime Minister Shehbaz Sharif visited victims in hospital.
“Just returned from Peshawar. The sheer scale of the human tragedy is unimaginable. This is no less than an attack on Pakistan,” Mr Sharif posted on Twitter.
“The nation is overwhelmed by a deep sense of grief. I have no doubt terrorism is our foremost national security challenge.
“My message to the perpetrators of today’s despicable incident is that you can’t underestimate the resolve of our people.”
Tweet from @CMShehbaz
Mr Sharif said the attackers behind the incident “have nothing to do with Islam”.
“Terrorists want to create fear by targeting those who perform the duty of defending Pakistan,” he said.
The city’s police chief, Muhammad Ijaz Khan, told reporters that the blast was believed to have been a suicide bombing.
A portion of the building collapsed and the roof caved in.
Police chief Khan said that the capacity of the main hall of the mosque was nearly 300 people and it was almost packed to capacity at the time of the explosion.

A mourner at the site of the mosque blast. Photo: Getty
Amjad Khan, an officer at the Peshawar Judicial Academy whose office is nearby, said he was shaken by the sound and the intensity of the blast.
“It reminds me of those days when there used to be daily bombings in Peshawar. Everybody is frightened now. People fear for their safety, especially in the areas where security forces are present,” he told DPA.
A policeman who survived the attack told Geo News that the “powerful” explosion took place the moment prayers started.
“There was smoke everywhere after the blast,” he said.
An inquiry would be conducted into how the multi-layered security infrastructure at the site was breached, Interior Minister Rana Sanaullah said.

The damaged mosque inside a police headquarters. Photo: Getty
Violence has surged in Pakistan after months of peace talks between the government in Islamabad and the Taliban militants hiding in Afghanistan collapsed in November.
Negotiations were being brokered by the Haqqani network of the Afghan Taliban.
Both the Pakistani Taliban and Islamic State militants have targeted worshippers at mosques in the past.