At least five people were killed and 31 others, including five women, injured in an attack by a Taliban suicide team on the Afghan parliament here on Monday as a second district in the northern province of Kunduz fell to the Islamist group, media reported.
The militant assault ended after all seven attackers were killed by security forces.
"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," Kabul Police chief Abdul Rahman Rahimi was quoted by Khaama press as having said.
The attack on the parliament complex, located in the capital's Darul Aman area, began with a suicide car bomb attack which smashed windowpanes of several buildings in the vicinity and was followed by exchange of fire between the militants and security forces.
While a number of lawmakers were evacuated from the building, several others remained holed up in the building's basement, media reports said.
According to interior ministry spokesperson Sediq Sediqi, the attackers entered a building under construction near the Parliament House when security forces engaged them, Ariana News reported.
More From This Section
Taliban militants claimed responsibility for the attack, maintaining that they inflicted heavy casualties on the lawmakers inside the parliament building. Officials in Kabul, however, rejected the Taliban claim.
The attack came when Second Vice President Sarwar Danish was introducing Massoum Stanekzai, the nominee for the crucial post of defence ministry, to the lawmakers for a vote of confidence.
"Several mujahideen have entered the parliament building, heavy fighting is on," Taliban spokesman Zabihullah Mujahid tweeted earlier.
"The attack happened at a time when the defence minister was being introduced," he added.
The withdrawal of foreign forces and a reduction in US airstrikes have allowed Taliban fighters to launch several major attacks in important Afghan provinces.
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 insurgents launched a countrywide offensive in late April, stepping up attacks on government and foreign targets in what was expected to be the worst fighting season in a decade.
Earlier, the Taliban rebuffed requests from senior Afghan clerics to halt attacks during the month of Ramadan -- the holy month of fasting for devout muslims -- as a surge in violence has sent civilian casualties soaring.
Afghan President Ashraf Ghani, while condemning the attack, said the targeting of civilians during the month of Ramadan is "un-Islamic" and those responsible are simply criminals.
Ghani said in a statement issued by the Presidential Palace that "those conducting such terrorist attacks are criminals who fail to obey the (country's) laws or Islam".
Immediately after the foiled attack on parliament, Ghani spoke with the Speaker of the Wolesi Jirga (Lower House of Parliament) Abdul Rauf Ibrahimi to make sure that all lawmakers and staff were safe and secure, the statement read.
The attack was widely condemned by neighbouring Pakistan which praised Afghan security forces for quickly suppressing the attack.
"We commend the role of Afghan security forces in effectively countering this act of terrorism," the Pakistan foreign office said in a statement issued in Islamabad.
Indian Prime Minister Narendra Modi also condemned the attack and called it a "cowardly act".
"The attack on the Afghanistan Parliament is a despicable and cowardly act. There is no place for such attacks in a democracy," Modi tweeted.
"My prayers are with those injured. We stand shoulder to shoulder with the people of Afghanistan in this hour," he added.
Indian Congress president Sonia Gandhi, while expressing deep concern over the Taliban attack in the Afghan parliament complex, said such cowardly attacks by terrorists can never deter the democratic traditions gaining strength the world over.
Joining the condemnation, the UN Assistance Mission in Afghanistan (UNAMA) also strongly condemned Taliban's assault on the country's parliament.
"The attack against the Parliament, for which the Taliban have claimed responsibility, is a clear and deliberate affront to democracy in Afghanistan, an attack against the Afghan peoples' democratically elected representatives," the UN Secretary-General's Deputy Special Representative for Afghanistan Tadamichi Yamamoto was quoted in the UNAMA statement as saying.