KARACHI, Pakistan — Militants launched an hourslong assault on the police headquarters in Pakistan’s largest city on Friday, officials said, the latest in a string of attacks in recent months that have shaken many Pakistanis’ sense of security and spurred concerns about militant groups regaining strength from safe havens in neighboring Afghanistan.
The assault in Karachi on Friday began around 7:10 p.m., when three militants stormed the five-story building in a heavily guarded neighborhood home to many senior officers with Pakistan’s security forces, according to Pakistani officials. For around four hours, the sounds of gunfire and explosions could be heard in the heart of the southern port city as the police and security forces battled the militants inside.
Seven people — including the three attackers — were killed in the assault and 14 others were wounded, according to Murtaza Wahab, the spokesman for Sindh Province.
“All three attackers were killed during the operation,” said Muqadas Haider, a senior police officer. “One of them blew himself up on the building’s fourth floor, while the other two were shot dead on the roof.”
The Pakistani Taliban, known as Tehreek-e-Taliban Pakistan, or T.T.P., claimed responsibility for the assault.
The attack in Karachi comes three weeks after a mosque bombing in Peshawar killed at least 101 people and wounded 217 others, mostly police officers and government employees. That blast, for which a faction of the T.T.P. claimed responsibility, was the deadliest to hit Pakistan in years.
The high-profile attacks from the group have added to mounting evidence that the Pakistani Taliban is regaining strength in Afghanistan under that country’s new Taliban administration, analysts say.
For many in Karachi, the hourslong assault felt like a violent throwback to a decade ago, when the Pakistani Taliban established a stronghold in the city, bringing a guerrilla war once confined to the country’s tribal areas into the economic hub.
Formed in 2007 among a loose network of militants, the Pakistani Taliban quickly emerged as one of the country’s deadliest militant organizations.
For years, violence from the group was mostly contained to the country’s tribal belt along the Afghanistan border. But after a concerted Pakistani military operation against the group’s base in the tribal areas in 2009, some militants began migrating to the port city of Karachi.
Within a few years, the group had built a strong presence in Karachi, reshaping the city’s established network of competing criminal, ethnic and political armed groups. Across Karachi, Pakistani Taliban militants ran extortion rackets, killed political rivals and carried out bloody attacks on security forces.
In one of the group’s largest attacks, in June 2014, 10 militants with the T.T.P. infiltrated Pakistan’s largest international airport in Karachi, setting off an hourslong battle with security forces, as passengers waited in a nearby terminal and in planes grounded on the tarmac. The attack prompted a Pakistani military offensive that flushed most T.T.P. fighters into Afghanistan.
After the Afghan Taliban seized power in Afghanistan in August 2021, Pakistani authorities expected that the new government would help rein in the T.T.P. in return for the covert support Pakistan had given the Afghan Taliban during the U.S.-led war in Afghanistan. But instead, the T.T.P. appears to be regrouping from bases within Afghanistan, analysts say, and announcing its return in Pakistan in a bloody show of suicide attacks.
On Friday night, the prospect of that return became real as residents heard the exchange of gunfire for hours.
“The violence and terrorism have returned to the city after a few years of peace,” said Bakht Ali, 31, a student whose uncle was killed in a T.T.P. attack over nonpayment of extortion in 2013. “Through attacking police headquarters, the Taliban showed that they are back with new strength. God save us from them.”
Zia ur-Rehman reported from Karachi, and Christina Goldbaum from Kabul.