Security forces gunned down seven armed attackers belonging to the Taliban insurgents who launched a brazen attack on the Afghan Parliament in the morning.
The attackers triggered massive explosions and gunfire that injured at least 31 people, mostly women and children.
A bomber detonated his explosive-laden car on the busy Darul Aman road near the gates of Parliament, damaging other vehicles and nearby buildings. More than half a dozen blasts followed and the attackers exchanged fire with security personnel who converged on the site.
Security forces engaged the attacking militants for nearly two hours while also evacuating lawmakers and staff members from the Parliament complex.
Parliament was in session to approve the appointment of the new defence minister Masood Stanekzai, a post that has been vacant for nine months.
Media quoted parliament officials as saying that all the seven attackers have been killed by special forces.
The insurgents, however, captured two districts in the north of the embattled country, witnesses said.
The Taliban captured Dasht-e-Archi district a day after hundreds of militants took control of the adjacent district of Chardara.
The attack on Parliament came after a second district fell to the Taliban in the north in two days.
"A suicide bomber blew himself up just outside the parliament building and several fighters took positions in a building close to Parliament," Ebadullah Karimi, spokesperson for Kabul police, said shortly after the assault began.
Interior ministry spokesperson Sediq Sediqqi tweeted that Afghan Police had repelled the attack and killed the seven attackers. No MP was wounded, he added.
Afghan Taliban spokesperson Zabihullah Mujahid said in a message sent to the media that the suicide bombers had carried out the attack. He described it as a ''coordinated suicide attack''.
"We have launched an attack on parliament as there was an important gathering to introduce the country's defence minister," Mujahid said.
The militants are pushing to recapture power over 13 years after the US-led military intervention toppled the Taliban from power.