Pakistan's Taliban has been emboldened by the Afghanistan Taliban takeover. (Representational)
At least 95 people, mostly policemen, were killed in a suicide blast at a mosque inside a police headquarters in northwest Pakistan.
The attack was a huge breach in security distinct from the increasing low-level attacks in Pakistan, tied to turmoil in neighbouring Afghanistan.
Here are the facts:
What threats does Pakistan face?
Pakistan has long struggled to govern its northwestern region neighbouring Afghanistan, where rugged terrain and a porous border offer terrorists safe haven.
Attacks by the Pakistani Taliban -- known as Tehreek-e-Taliban Pakistan (TTP) -- are on the rise, with a recent change in strategy to target security officials and avoid civilians.
The regional faction of the Islamic State group -- Islamic State-Khorasan -- is also active there and killed 64 people in a suicide blast at a minority Shiite mosque in Peshawar last year.
Further south, separatists in Balochistan have been stepping up their attacks on security forces.
They are all highly factional, with commanders regularly splintering off their fighters to form smaller and more obscure groups.
"At this moment, this is irrelevant which group carried out the attack," said Imtiaz Gul, an analyst with Islamabad's Center for Research and Security Studies, referring to Monday's bombing.
"They are franchises of terrorism, operating under different names with the same objective," he told AFP. "To sow fear and chaos in the country."
Why are attacks on the rise?
Over the first year of Taliban rule in Kabul, attacks spiked by 50 per cent in Pakistan, mostly along the western provinces bordering Afghanistan, according to the Pak Institute for Peace Studies (PIPS).
During the US-led intervention, America pounded mountain hideouts on both sides of the boundary with drone strikes, hindering terrorists' ability to organise.
Islamabad has accused the Taliban in Kabul of failing to secure its borders and allowing terrorists inside Afghanistan to plan attacks against Pakistan.
Who are the TTP?
The TTP were founded in 2007 by Pakistani fighters in the Afghan Taliban, who splintered off to attack Islamabad as payback for supporting America's post-9/11 invasion.
They carried out some of the most horrific bombings in Pakistan's history and gained global notoriety for shooting schoolgirl Malala Yousafzai.
They were at the height of their power in 2014 when they raided a school for children of army personnel, killing 150, prompting a major military clearance operation that pushed them into Afghanistan.
The UN Security Council (UNSC) said the TTP "arguably benefitted the most of all the foreign extremist groups in Afghanistan from the Taliban takeover".
A shaky on-off truce with Islamabad failed in November and police are the TTP's favoured target, but they denied Monday's bombing -- saying attacks on religious sites are an "impeachable offence".
But one intelligence official told AFP they were investigating the possibility that a more hardline splinter faction of the TTP was responsible.
"This may say something about the cleavages within the group," Michael Kugelman, the director of the South Asia Institute at the Wilson Center in Washington, told AFP.
Who are IS-K?
Islamic State-Khorasan (IS-K) emerged from Afghanistan's eastern Nangarhar province around 2015, and hopes to instate a hardcore Islamic caliphate spanning India, Iran and Central Asia.
Their numbers are estimated between 1,500 and 4,000 but the UNSC said there is an "upward trend" in recruitment because the Taliban released prisoners in Afghanistan in their 2021 offensive.
IS-K have no qualms about attacking mosques belonging to minorities.
"Islamic State does have sleeper cells in the tribal areas along the Afghan border and even in the suburban areas of Peshawar," a security official told AFP.
IS is a Sunni Islamist group, like the Taliban, but the two are bitter rivals with diverging ideologies.
What is Islamabad's role?
Islamabad has been accused of playing a double game when it comes to terrorist groups: backing them when it suits their aims.
During the US intervention in Afghanistan, Pakistan was accused of allying with the United States while sheltering their historic partners in the Afghan Taliban.
Now that the war is over, that same situation haunts them, with their professed allies in Kabul sheltering the Pakistani Taliban that threaten security at home.
"Pakistan was involved in all these sort of games," PIPS director Amir Rana told AFP. "Pakistan must learn from the mistakes."
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)