A Taliban suicide bomber and several gunmen attacked the Afghan parliament on Monday, shattering windows and forcing lawmakers to flee, 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 and the fall of the second district raises questions about the NATO-trained Afghan security forces' ability to fight the Taliban.
Insurgents are pushing to take territory more than 13 years after the U.S.-led military intervention that toppled the Taliban from power.
"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.
Afghan security officials said all lawmakers were safe.
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. We are in a safe place right now."
The withdrawal of foreign forces and a reduction in U.S. 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.
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."
The fall of the second district within a day underlines questions about Afghan forces' ability to quell the Taliban.
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.