Earlier this week, a suicide blast ruptured the relative calm that had returned to Pakistan in recent years. The attack at a mosque in the northwestern city of Peshawar killed more than 100 people and stunned many Pakistanis who thought the days of such horrific suicide bombings were long behind them.
While Monday's attack was among the worst in the country in a decade, the blast doesn't necessarily signal a return of terrorism so much as an escalation of a problem that never really went away.
The Pakistan Taliban, also known as Tehreek-e-Taliban Pakistan (TTP), denied responsibility for Monday's blast. Instead, a TTP faction, Jamaat-ul-Ahrar, claimed to be behind it.
But in many ways, Pakistan's deteriorating security situation is directly linked to a resurgent TTP and the increasing fragility in neighbouring Afghanistan since the Taliban's takeover in August 2021.
Read more: How Pakistan stands to gain - or lose - from the Taliban's victory in Afghanistan
The Pakistani government had supported the Afghan Taliban for years, but the relationship began to break down after the Afghan Taliban offered shelter to TTP fighters and released thousands of terrorists from prison after taking power.
The TTP not only appeared to be strengthened and energised by the Taliban's return to power in Afghanistan, it also drew closer to the group.
Last year, the Afghan Taliban facilitated dialogue between the Pakistani government and the TTP that led to a ceasefire deal. But by November, the TTP ended the five-month truce, claiming the government had not complied with all its requests, most notably the freeing of important TTP members.
The result has been a slow but steady uptick in terrorist attacks.
Documented acts of terrorism hit a high of 3,923 in Pakistan in 2013, with more than 2,000 deaths. The number of fatalities plunged to 267 in 2021, but last year, started to climb again to 365.
Pakistan also only registered four suicide attacks in 2021, but there were 13 last year and four already this year. The TTP has claimed responsibility for most attacks.
Decade-long war on extremism
Pakistan had achieved enormous strides against terrorism over the past 15 years, in large part because of its significant "Rah-e-Rast" military operation in 2009 and the "Zarb-e-Azb" operation in 2014.
The TTP retaliated to the latter with an attack on an army public school in Peshawar in 2014, killing more than 130 children. This prompted the army to intensify its activities, and by 2017, it had largely routed the TTP.
These security operations, however, only addressed the symptoms of the problem by pushing most TTP fighters across the border into Afghanistan. Terrorist attacks in Pakistan declined, but the problem didn't go away.
Despite the development of a counter-terrorism blueprint called the National Action Plan in 2014, the government's security operations have been too limited in scope. They do not focus on all terrorist groups, but selectively target a few, such as the TTP.
The National Counter Terrorism Authority has registered 78 terrorist organisations in Pakistan, but little is known what the government is doing to counter them. The National Action Plan also does not focus much attention on preventative measures like education.
Read more: 'It is a big relief for me': how the welfare provided by madrassas holds a key to fighting the Taliban
Addressing the root causes of extremism
Nonetheless, there is growing interest in Pakistan to invest more in promoting a stronger national counter-narrative against extremist ideologies, such as the Paigham-e-Pakistan, which the government developed with the help of hundreds of Islamic scholars.
Moreover, there is a growing desire in policymaking circles to address the root causes of extremism, including the grievances of locals in the region previously known as the Federally Administered Tribal Areas on the Afghan border and Balochistan in southwestern Pakistan.
The growing insecurity in Balochistan, for instance, is in part driven by Chinese investment, which is opposed by the militant Baloch Liberation Army. The group believes the government has exploited the region's resources and ignored its development needs. It has targeted Chinese citizens in numerous attacks.
The stakes here are very high for Pakistan, which is desperate for foreign investment. As such, Planning Minister Ahsan Iqbal has urged the government to focus on addressing the socio-economic concerns of locals, in particular young people, so they don't turn toward extremism.
The same grievances exist in the former tribal areas, where millions have suffered due to the government's neglect.
Until 2018, this region was governed under the notorious, colonial-era Frontier Crimes Regulation. This meant Pakistani laws did not apply and there were no local courts or political parties, allowing armed groups to thrive. The first time residents participated in any election was in 2019, more than 70 years after independence.
When the government merged the tribal areas with a neighbouring province in 2018, residents believed their lives would improve. But this coincided with the resurgence of the TTP in the region, bringing new concerns about security and stability.
What the state should do now
For now, Pakistan's counter-terrorism efforts are largely focused on TTP, but the country needs a broader approach.
First, Pakistan needs to have its own house in order by addressing the ongoing governance challenges in the former tribal areas and Balochistan.
Second, the government can no longer limit counter-terrorism operations to only a few areas. This will only increase the grievances of locals, who continue to suffer due to displacement and disempowerment. As terrorist groups are spread across the country, it is time the state tries a more holistic approach.
With the TTP, it is already clear that attempting dialogue has not worked. It only provided the group more legitimacy and time for recruitment and fundraising.
Instead of playing into the hands of terrorist groups, the government needs to address the structural causes of extremism, such as the marginalisation of millions living in peripheral areas, in particular highly vulnerable young people.
Author: Zahid Shahab Ahmed - Senior research fellow, Deakin University