Dozens of people have been confirmed dead in a blast at a mosque frequented by police officers in northwest Pakistan's Peshawar

Peshawar (Pakistan) (AFP) - A suicide blast at a mosque inside a Pakistan police headquarters was a targeted revenge attack, a police chief said Tuesday, as rescue efforts ended with the death toll standing at 100.

Between 300 and 400 policemen had gathered for afternoon prayers at the compound’s mosque on Monday in the provincial capital Peshawar when an entire wall and most of the roof were blown out, showering rubble on officers.

“We are on the frontline taking action against militants and that is why we were targeted,” city police chief Muhammad Ijaz Khan told AFP.

“The purpose was to demoralise us as a force.”

On Tuesday evening rescuers finally ended a marathon operation which saw them pry survivors and corpses out of the wreck of the mosque, rushing those who could be saved to hospitals.

Wajahat Ali, a 23-year-old police constable whose feet were broken in the blast, told AFP from hospital that he had “remained trapped under the rubble with a dead body over me for seven hours. I had lost all hope of survival.”

Shahid Ali, another survivor, said the explosion took place seconds after the imam started prayers.

“I saw black smoke rising to the sky. I ran out to save my life,” the 47-year-old police officer told AFP.

Low-level militancy, often targeting security checkpoints, has been steadily rising in the areas near Peshawar that border Afghanistan since the Taliban seized control of Kabul in August 2021.

The assaults are claimed mostly by the Pakistani Taliban, as well as the local chapter of the Islamic State, but mass casualty attacks remain rare.

Map of Peshawar in Pakistan locating the site of a deadly blast on January 30.

The head of Khyber Pakhtunkhwa province police force, Moazzam Jah Ansari, told reporters that a suicide bomber had entered the mosque as a guest, carrying 10-12 kilogrammes (about 22-26 pounds) of “explosive material in bits and pieces”.

He added that a militant group that was on-and-off affiliated with the Pakistani Taliban could be behind the attack.

- ‘He had died’ -

Interior minister Rana Sanaullah told Pakistan’s national assembly the dead included 97 police officers and three civilians, with 27 patients still in critical condition.

Authorities are investigating how a major security breach could happen in one of the most tightly controlled areas of the city, housing intelligence and counter-terrorism bureaus, and next door to the regional secretariat.

“Terrorists want to create fear by targeting those who perform the duty of defending Pakistan,” Prime Minister Shehbaz Sharif said in a statement.

Authorities use heavy machinery to clear the rubble and search for victims on January 31, 2023 a day after a suicide blast at a mosque inside the police headquarters in Peshawar

Dozens of slain police officers have already been buried in several mass prayer ceremonies, with coffins lined up in rows and draped in the Pakistani flag while a guard of honour was performed.

Family and friends of 22-year-old police officer Ali Aameer, who was just four months into the job, gathered in Peshawar Tuesday for his funeral.

His uncle, Mukhtiar Khan, had frantically called his nephew’s phone after learning of the attack.

“I kept calling his mobile from the police hospital and suddenly his number worked, but then it cut off,” Khan said.

“I was happy though, (thinking) that he is alive. But when I called him a second time, the person who picked up said that he had died.”

The White House on Tuesday called the attack “unconscionable” in a statement, echoing UN Secretary-General Antonio Guterres who has said such violence was “abhorrent”.

Pakistan is already being hobbled by a massive economic downturn and political chaos, ahead of elections due by October.

- Rising militancy -

In a statement, the Pakistani Taliban – separate from the Afghan Taliban but with a similar Islamist ideology – denied it was responsible for the latest blast.

A wounded policeman is treated on January 31, 2023 at a government hospital a day after a mosque blast in Peshawar

Known as the Tehreek-e-Taliban Pakistan, the group carried out a years-long wave of horrific violence after emerging in 2007, but recently has attempted to rebrand itself as a less brutal outfit, claiming not to target places of worship.

But a security official in Peshawar, who asked not to be named, said Tuesday that authorities were considering all possibilities, including the involvement of a TTP splinter faction, the Islamic State group or a coordinated attack by several groups.

“Often in the past militant groups, including the TTP, that carry out attacks in mosques do not claim them” because a mosque is considered a sacred place, the official told AFP.

Pakistan was once plagued by almost daily bombings, but a major military clearance operation which started in 2014 largely restored order.

Analysts say militants in the former tribal areas adjacent to Peshawar and bordering Afghanistan have become emboldened since the return of the Afghan Taliban.

“Terrorism has become a national security crisis for Pakistan again – as it was a decade ago – and it will worsen unless concerted action is taken to address it,” Brookings Institution analyst Madiha Afzal told AFP.

Mass casualty attacks remain relatively rare, with IS claiming the most recent blast on a Shiite mosque in Peshawar last March that killed 64.

Provinces around the country announced they were on high alert after the blast, with checkpoints ramped up and extra security forces deployed, while in the capital Islamabad snipers were posted on buildings and at city entrance points.