PESHAWAR, Pakistan (AP) - A suicide bomber who killed 101 people at a decades-old mosque in northwest Pakistan this week had disguised himself in a police uniform and did not raise suspicion among guards, the provincial police chief said on Thursday.

Moazzam Jah Ansari said the suicide bomber, who arrived with a motorcycle to the mosque on a police compound, had been identified. Police were close to arresting suspects in Monday's attack, one of the deadliest ever in Peshawar, the capital in the Khyber Pakhtunkhwa province.

Ansari provided no further details about who was responsible, but Pakistan's defense and interior ministers in speeches to Parliament this week blamed the Pakistani Taliban for orchestrating the bombing. They said the insurgents had sanctuaries in Afghanistan.

“We will avenge the martyrdom of each and every policeman,” Ansari told a news conference.

Ansari said those who are responsible for the attack, including the mastermind and facilitators, will be arrested and punished under the law.

The blast collapsed the roof of the 50-year-old mosque, killing 101 people, mostly policemen. Two hundred twenty-five people were injured. He said six or seven policemen were “martyred” by the bombing but most casualties were caused when the sprawling roof, which was supported by outside walls but no pillars, caved in.

Footage released by police shows the suspected bomber disguised as a policeman walking toward the compound with a motorcycle, giving the impression that the vehicle wasn't working.

More than 300 worshippers were praying in the Sunni mosque, with more approaching, when the bomber set off his explosives vest. Ansari said the attacker was not searched because guards assumed that he was one of their colleagues.

“Yes, I admit that it was a security lapse and I take responsibility for it,” Ansari said.

He dismissed reports that the mosque had been hit by a drone, or planted explosives.

“There is no truth in such speculations and claims,” Ansari said. “It was a suicide bombing.”

Ansari spoke a day after dozens of police officers in a rare move joined a peace march organized by the members of civil society groups in Peshawar, demanding protection for themselves.

Hours after the bombing, Pakistan's Defense Minister Khawaja Mohammad Asif and Interior Minister Rana Sanaullah Khan accused the Pakistani Taliban, known by the acronym TTP, of carrying out the attack. In their speeches to Parliament, they said militants operated from neighboring Afghan territory. Pakistan wants the Afghan Taliban to take action against the TTP group.

Shortly after the bombing, a TTP commander claimed responsibility, but more than 10 hours after the attack the chief spokesman for the group distanced the TTP from the carnage, saying it was not its policy to attack mosques.

On Wednesday, Afghanistan's Taliban-appointed foreign minister, however, had asked Pakistani authorities to look for the reasons behind militant violence in their country instead of blaming Afghanistan. The comments from Amir Khan Muttaqi came after Pakistani officials said the attackers who orchestrated Monday's suicide bombing were using Afghan soil to target civilians and security forces.

Pakistan Prime Minister Shahbaz Sharif visited a hospital in Peshawar after the bombing and vowed “stern action” against those behind the attack. Pakistan, which is mostly Sunni Muslim, has seen a surge in militant attacks since November when the Pakistani Taliban ended a cease-fire with government forces.

The violence has increased in Pakistan since the Afghan Taliban seized power in neighboring Afghanistan in August 2021 as U.S. and NATO troops pulled out of the country after 20 years of war.

The TTP is separate from but a close ally of the Afghan Taliban.

Associated Press writer Munir Ahmed contributed to this story from Islamabad