Authorities are also probing the possibility that people inside the compound helped to coordinate the attack.
Police in Pakistan have detained 23 people in connection to a blast at a mosque inside a police headquarters that killed 101 people, a senior official who asked not to be named.
Authorities are also probing the possibility that people inside the compound helped to coordinate the attack, the senior provincial police official told AFP on condition of anonymity.
"We have detained people from the police line (headquarters) to get to the bottom of how the explosive material made its way in and to see if any police officials were also involved in the attack," the senior official said on Wednesday.
A suicide bomber slipped undetected into a highly sensitive compound in northwest Peshawar and detonated explosives among a row of worshippers in the compound's mosque on Monday, causing a wall to collapse and crush officers.
"The attacker and facilitators might have had links outside Pakistan."
He said some among the 23 detained were also from the city and nearby former tribal areas which border Afghanistan.
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.
READ MORE: 'Deep sense of grief' as relatives bury the dead in Pakistan mosque attack
Gripped by fear
Moazzam Jah Ansari, the head of Khyber Pakhtunkhwa province police force, on Tuesday told reporters that a suicide bomber had entered the mosque as a guest, using 10-12 kilogrammes (about 22-26 pounds) of explosive material earlier brought to the site in bits and pieces.
He added that a militant group that was on-and-off affiliated with the designated terrorist group Tehreek-i-Taliban Pakistan could be behind the attack.
It is Pakistan's deadliest assault in five years and harks back to more than a decade ago when Peshawar was at the centre of rampant terrorism attacks.
"The main fear is a second attack, another blast ... a suicide bomber may blow himself in a market," said 55-year-old Naeemullah Jan, a building contractor in the city.
Police have said the mosque blast was a revenge attack against the police force who are on the frontline fighting a resurgence in militancy since the Afghan Taliban came to power across the border.
READ MORE: Explained: Pakistan's Taliban insurgency and the deadly cycle of violence
Funerals were held across the northwestern province of Pakistan for those killed in a suicide attack at a mosque in Peshawar city, as the death toll rose to 100 and search operations endedhttps://t.co/V1N4F0wcVY— TRT World (@trtworld) January 31, 2023
"Earlier I used to feel safe near the police, now when a police car or officers pass near me, I fear in my heart that they might be attacked and I will also be hurt," 55-year-old Muhammad Haneef Awan told AFP from a market in Peshawar.
Don't pass blame: Afghanistan
Meanwhile, the Taliban government in Kabul warned Pakistan's ministers "to not pass the blame to others".
"They should see the problems in their own house...Afghanistan should not be blamed," foreign minister Amir Khan Muttaqi said in a press conference.
Pakistan is already being hobbled by a massive economic downturn and political chaos, ahead of elections due by October.
READ MORE: What options does Pakistan have to deal with the TTP?