Kabul: A Taliban attack on the Afghan parliament on Monday ended after all seven militants were killed, the government said.
"The attack has ended now. Seven attackers were involved - one detonated a car near the parliament building and six were killed by security forces after they entered a nearby building," deputy interior ministry spokesman Najib Danish told AFP.
At least 19 people were injured as the suicide attack shattered windows, sending a plume of black smoke across Kabul, as a second district in two days fell to the Islamist group in the north.
Violence has spiraled in Afghanistan since the departure of most foreign forces at the end of last year as the insurgents push to take territory more than 13 years after the US-led military intervention that toppled the Taliban from power.
A series of Taliban gains, and Monday's attack on the symbolic centre of power, have raised questions about the NATO-trained Afghan security forces' ability to cope.
Four women were among the 19 wounded, said Sayed Kabir Amiri, a health official who coordinates Kabul hospitals.
"A suicide bomber blew himself up just outside the parliament building and several fighters took positions in a building close to parliament," said Ebadullah Karimi, spokesman for Kabul police.
Kabul police chief Abdul Rahman Rahimi said all lawmakers were safe and that fighting was ongoing. TV pictures showed leglislators calmly leaving the building which was engulfed with dust and smoke.
Taliban spokesman Zabihullah Mujahid claimed responsibility.
"We have launched an attack on parliament as there was an important gathering to introduce the country's defence minister," he said by phone.
Lawmaker Shukria Barekzai said: "It was a huge blast that shook the building and shattered windows."
The withdrawal of foreign forces and a reduction in US air strikes have allowed Taliban fighters to launch several major attacks in important Afghan provinces.
The second district to fall to the Taliban on Monday was in the northern province of Kunduz. Officials said it fell after urgently needed reinforcements failed to arrive.
The Taliban captured Dasht-e-Archi district a day after hundreds of militants fought their way to the centre of the adjacent district of Chardara.
"The Taliban managed to take it over this morning as the area has been surrounded for days," Nasruddin Saeedi, the district governor who escaped to the provincial capital, Kunduz city, told Reuters by telephone.
"They are many foreign fighters with heavy machine guns. We have asked for reinforcements, but none arrived."
Afghan soldiers were preparing a counterattack to retake both districts, another local official said.
Monday's heavy fighting was just three km (two miles) from the governor's compound.