KABUL, Afghanistan — The Taliban claimed responsibility on Wednesday for an attack on the home of a top military official in Kabul that killed eight people, highlighting the insurgents’ ability to strike in the heart of the Afghan capital as they continue their sweeping military campaign.
The ambush began around 8 p.m. on Tuesday with a car bomb that detonated outside the home of Bismillah Khan Mohammadi, the acting defense minister. For several hours afterward, other blasts and sporadic gunfire could be heard in the center of the city after gunmen stormed the building and security forces fought to rescue the roughly 80 people trapped inside.
The complex attack — the largest the Taliban have carried out in the city in nearly a year — penetrated a neighborhood that is home to many high-ranking Afghan officials and close to Kabul’s heavily fortified green zone. It comes as the insurgents push the front lines of their military campaign from rural areas deep into provincial capitals in the south and west of Afghanistan.
A Taliban spokesman described the ambush in Kabul as “the beginning of retaliatory attacks,” suggesting that the insurgents planned to target Afghan military officials and the small contingent of foreign troops that remain in the country to protect diplomats and Kabul’s international airport after the withdrawal of U.S. forces.
The Taliban “will no longer remain indifferent” to those groups and “will stand against them with full force,” said the spokesman, Zabihullah Mujahid.
Minutes before the initial explosion on Tuesday, Mohammad Azim Mohsini, a member of Parliament who is Mr. Mohammadi’s neighbor, left his home where dozens of people had gathered earlier in the night for a prayer ceremony to mourn the death of his mother. After the blast, one attacker entered his house, killing four people, while other assailants opened fire from outside, he said.
“A number of our civilian neighbors — including women, children and men — were also killed and wounded,” Mr. Mohsini said.
Two police officers as well as an employee with the Afghan Ministry of Refugees and Repatriation and his child were among the eight people killed in the ambush, officials said. The defense minister survived the attack, but some of his security guards were among the 20 people wounded, he said in a video message posted to Twitter.
“I assure all of you that such incidents won’t have the slightest impact on our morale or resolution to defend you and my homeland,” he said, addressing the Afghan public.
Still, that the Taliban could attack the home of a top military official in the middle of Kabul sent an alarming message to the country’s military leaders, whose forces have been battered since international troops began withdrawing in May and the Taliban started a major military offensive.
In a serious escalation of its campaign, the group has laid siege in recent weeks to three provincial capitals — Herat in the west and Lashkar Gah and Kandahar in the south — after sweeping through much of the country’s rural areas. The insurgents now control more than half of the country’s 400-odd districts, according to some assessments.
As the assault unfolded on Tuesday, hundreds of Afghans poured onto the streets of Kabul, chanting “Allahu akbar,” or “God is great,” to show support for Afghan security forces. As others joined the chanting from rooftops and windows, the booming sound of their voices echoed across the city.
The day before in Herat, the capital of the province of the same name, residents also marched through the streets, shouting the phrase in a show of defiance against the Taliban as they besieged the city.
But in a sign of the conflict to come as the Taliban advance on modern urban areas, Mr. Mujahid on Wednesday called the protesters “American slaves and seculars.”
Anyone who sides with Afghan forces, he added, “will be reckoned with for God’s sake.”
Najim Rahim, Sharif Hassan and Fatima Faizi contributed reporting.