It was a bloody reminder that the dark days of extremist violence appeared to have returned to Pakistan: a suicide attack on a religious festival in the country’s southwest this past week that left around 60 people dead.

For nearly a decade, Pakistan had seemingly broken the cycle of such deadly attacks. In 2014, the country’s security forces carried out a large-scale military operation in the tribal areas near Afghanistan, forcing militants across the border and returning a relative peace to the restive frontier region.

But since the Taliban seized power in neighboring Afghanistan in August 2021, offering some groups safe haven on Afghan soil and starting a crackdown on others that pushed their fighters into neighboring Pakistan, the violence has roared back. The number of terrorist attacks in Pakistan rose by around 50 percent during the Taliban’s first year in power, compared with the year before, according to the Pak Institute for Peace Studies, which monitors extremist violence and is based in Islamabad, the capital of Pakistan.

This year, the pace of attacks have continued to rise. The attacks themselves have also become bolder, reviving the fears of a terrorism-scared nation. In January, a suicide bombing at a heavily guarded mosque killed more than 100 people. A month later, militants struck the heart of Pakistan’s largest city, Karachi, waging an hourslong siege at the police headquarters. Another suicide blast, at a political rally, killed more than 50 people in July.

In the latest massacre, on Friday, a suicide bomber set off an explosion at a religious procession that left carnage in the street. No group has claimed responsibility yet.

Visiting the families of victims, Gen. Syed Asim Munir, the Pakistani Army chief, reiterated a government commitment to carry out a nationwide military operation against the armed groups.

“The armed forces, intelligence and law enforcement agencies shall not rest until the menace of terrorism is rooted out from the country,” General Munir said.

The violence has stoked fears that the region — already home to one of the highest concentrations in the world of groups on the U.S. Foreign Terrorist Organizations list — is becoming a hotbed of international terrorism. It has also fueled growing tensions between the Pakistani government and Taliban officials, who deny offering shelter to militant groups, including their ally, the Pakistani Taliban, also known as Tehrik-i-Taliban Pakistan, or T.T.P.

So far, there is little evidence of significant action by the Pakistani military to stamp out the militants. Pakistan can no longer count on the American military support that helped it drive out the militants a decade ago, and many believe that the country — already grappling with entrenched political and economic crises — is largely powerless to stop the violence.

The Pakistani government’s military efforts are hindered “mainly because of political divisions and financial constraints,” said Adam Weinstein, deputy director of the Middle East program at the Quincy Institute, a Washington-based think tank. “It’s doubtful whether they could sustain a full-fledged campaign against the T.T.P.,” he added.

The Pakistani Taliban, an ideological twin of the Taliban in Afghanistan, seeks to impose strict Islamist rule in Pakistan’s border areas and has been behind most of the attacks over the past two years. Founded in 2007, the group controlled swaths of the tribal areas along the border until the military crackdown in 2014.

With the Taliban back in power in Afghanistan, the group has resurged. Hundreds of Pakistani Taliban fighters were freed from Afghan prisons during the takeover. They armed themselves with American military equipment once provided to the U.S.-backed Afghan government, according to the Pakistani authorities. The group’s current leader, Mufti Noor Wali Mehsud, has also intensified efforts to bolster the group’s ranks, successfully luring outfits affiliated with Al Qaeda, as well as fighters from anti-Shia groups and several Pakistani militants who were part of the Taliban insurgency in Afghanistan.

In recent months, the Pakistani Taliban has carried out relentless attacks, mostly targeting Pakistani security forces in the tribal areas along the border. The clashes have led the security forces to suffer their worst casualties in eight years — nearly 400 army, police and other personnel have been killed so far this year, according to a report by the Center for Research and Security Studies, a think tank based in Islamabad.

Many police officers and soldiers say they feel underequipped to combat the insurgents.

Muhammad, a 34-year-old police officer in Khyber-Pakhtunkhwa Province of northwestern Pakistan, said that defending the mountainous district against well-armed insurgents was all but hopeless. A lingering ache in his leg reminds him of the peril — he sustained the injury when militants believed to be with the Pakistani Taliban opened fire on him and his colleagues during a routine night patrol in April.

“The attackers remained invisible to us, yet they had a clear sight of us — likely using night vision goggles,” said Muhammad, who asked to use only his first name because he feared reprisals and was not authorized to speak to the news media.

Pakistani officials have repeatedly asked the Taliban administration to rein in the Pakistani militants. Instead, Taliban officials in Afghanistan have suggested Pakistani officials address the militant group’s demands and offered to mediate talks. In recent months, frustration in Pakistan has seemed to boil over: officials announced last week that they would deport as many as 1.1 million Afghans residing illegally in Pakistan — a move many saw as retaliation against the Taliban administration in Afghanistan.

Deepening the crisis, Pakistan has also faced a fresh wave of violence from the Islamic State affiliate in the region, which is known as the Islamic State Khorasan, or ISIS-K. Unlike the Pakistani Taliban, the Islamic State has been antagonistic toward the Taliban in Afghanistan, saying they are not implementing true Sharia law, and has faced a brutal crackdown by Taliban security forces.

The Taliban have killed eight of the Islamic State’s leaders since the beginning of the year, according to American officials. But their offensive has also pushed some ISIS fighters into Pakistan, analysts say, where they have stepped up their attacks.

For ordinary Pakistanis in the tribal areas, the return of the militant violence has felt like a devastating slide back to when insurgents operated almost freely in the region, instilling a simmering sense of fear into residents’ daily lives. In recent months, the militants have restarted their extortion schemes, threatening businessmen and local leaders by demanding large sums of money to keep their families from being targeted.

In April, Mr. Ali, a rice trader who asked, for security reasons, that only his surname be used, received a menacing call that he said originated from a phone number in Afghanistan. The voice on the line delivered an ultimatum: pay $8,500, or his home would be attacked.

Initially, Mr. Ali alerted his local police station to the call and brushed off the threat. Then, a small explosion destroyed the entrance of his home. He called the number back, ultimately paying the extorter around $2,200.

My family was “jolted from their sleep and left traumatized by the midnight explosion at our home,” Mr. Ali said. “I cannot forget those horrific moments.”

The episode left him with an unsettling feeling that the militants had deployed informants in his neighborhood and market to identify wealthy targets to extort, he added. The police response was scant: Officers recommended that he install a security camera and advised him to limit his movements. Beyond that, there was nothing the police could do, they told him.

In response to the surging violence, some people have opted to pack up and leave their homes in the tribal areas — fearing for their lives if the militants overrun the area once more.

Saeed Wazir, a construction contractor from the North Waziristan district of Khyber-Pakhtunkhwa, left for Islamabad after an explosion that appeared to be intended for a military convoy but instead hit a truck carrying laborers. He said the current violence was almost more terrifying than before because the militants were working in the shadows, making the danger and his paranoia feel ever more present.

“They now operate underground and employ hit-and-run tactics,” Mr. Wazir said. “There’s a constant fear of stumbling upon a roadside explosive device or getting caught in gunfire or a suicide bombing.”