The death toll has risen to at least 87 people after a mosque suicide bombing which targeted policemen in the Pakistan province of Peshawar.
The mosque is within a high-security police headquarters area and a probe is under way into how the bomber got in.
Pakistan's PM and other leaders have condemned the attack - one of the worst in the country in recent years.
The Pakistani Taliban has denied involvement after an initial claim by one of its commanders.
"Terrorists want to create fear by targeting those who perform the duty of defending Pakistan," said PM Shehbaz Sharif. He declared a national day of mourning.
On Tuesday, rescuers were still scrambling to retrieve worshippers buried in the rubble, with a spokesman telling the BBC the operation would continue for another three hours.
"The rescue operation has been going on for more than 18 hours," Mohammad Bilal Faizi said.
"The bodies of 20 more people have been recovered and it's feared that some bodies may still be under the rubble."
The BBC saw ambulances racing in and out of the compound every few minutes.
A video circulating on social media and verified by the BBC shows half of a wall caved in. The mosque was covered in bricks and debris as people clambered over the rubble to escape.
Hours after the blast, BBC News witnessed a facility full of the injured, many still wearing their police uniforms.
Some were covered in burns cream, their skin red with burns from the explosion. Others have broken bones from being hit by falling rubble.
One man said he still could not hear because of the sound of the blast. Another man said he had been rescued after being trapped under the rubble for almost an hour.
The prime minister travelled to Peshawar on an emergency visit, where he will be briefed by local officials and visit those wounded by the blast.
UN Secretary General António Guterres condemned the attack, with his spokeswoman saying: "It is particularly abhorrent that such an attack occurred at a place of worship."
The attack on the mosque took place at the start of a key week for Pakistani diplomacy.
On Monday, the president of the United Arab Emirates, Mohamed bin Zayed Al Nahyan, was due to visit Islamabad - although the trip was cancelled at the last minute because of bad weather.
On Tuesday, an International Monetary Fund delegation is meant to visit Pakistan as part of the process to unlock a bailout loan to prevent the country from defaulting.
Last March, Peshawar was the target of another bombing, which killed dozens in a Shia Muslim mosque in the majority Sunni Muslim country.
In the capital Islamabad, police issued a high alert and said security at all entry and exit points to the city had been increased.