Two people, including a child, died when Taliban militants launched an assault on the Afghan parliament Monday, triggering gunfire and explosions and sending lawmakers scurrying for cover in chaotic scenes relayed live on television.
The attack came as the Afghan president's nominee for the crucial post of defense minister was to be introduced in parliament and ended two hours later when all seven attackers, including a suicide car bomber, were dead.
The assault on such a high-profile target in downtown Kabul raises fresh questions about security as Afghan forces battle a resurgent Taliban for the first time without the aid of NATO forces, who ended their combat mission in December.
"First a car bomb detonated on the main road near the parliament building, then a group of attackers entered a building in front of parliament," Kabul police spokesman Ebadullah Karimi said.
Two civilians, a woman and a child, were killed in the attack, according to police and the United Nations.
Deputy interior ministry spokesman Najib Danish said there were seven attackers and the health ministry reported 31 people, including five women and a child, wounded.
Dramatic television footage of the moment the first explosion struck showed pandemonium and screams inside parliament, with Speaker Abdul Rauf Ibrahimi sitting in his chair, calmly telling lawmakers "it's an electrical issue."
MP Mohammad Reza Khoshak, who was in the chamber at the time, described hearing "a loud explosion, followed by several other smaller explosions."
"In a few seconds the hall was filled with smoke and MPs began fleeing the building," he said.
The Taliban launched a countrywide offensive in late April, stepping up attacks on government and foreign targets in what is expected to be the bloodiest fighting season in a decade.
The militants recently rebuffed requests from senior Afghan clerics to halt attacks during the fasting month of Ramadan even as a surge in violence has sent civilian casualties soaring.
A group of suicide attackers last tried to storm parliament in 2012 as they launched coordinated attacks in several parts of the capital, including several diplomatic enclaves.
The Taliban, toppled from power in the 2001 US invasion of Afghanistan, swiftly claimed responsibility for the latest attack.
"Several mujahideen have entered the parliament building," Taliban spokesman Zabihullah Mujahid posted on Twitter.
"The attack happened at a time when the defense minister was being introduced."
Police denied that Taliban fighters had breached the high-security complex.
The United Nations Assistance Mission in Afghanistan (UNAMA) strongly condemned the raid, saying it was a "clear and deliberate affront to democracy in Afghanistan."
The recent surge in insurgent attacks has taken a heavy toll on ordinary Afghans, according to the UN mission in Afghanistan.
Almost 1,000 civilians were killed during the first four months of this year, a sharp jump from the same period last year, it said.
Afghan authorities have repeatedly tried to jumpstart talks with the Taliban in the hope of ending the 13-year conflict, but the militants have set tough conditions, including the withdrawal of all foreign troops in Afghanistan.
NATO's combat mission formally ended in December but a small follow-up foreign force of about 12,500 mainly US troops has stayed on to train and support local security personnel.
President Ashraf Ghani's government has drawn criticism for failing to end growing insurgent attacks, which critics partly blame on political infighting and a lengthy delay in appointing a defense minister.
Ghani last month nominated Mohammad Masoom Stanekzai, a top official in the government body overseeing the country's peace process, for the job.
The post had been left vacant for months due to disagreements between Ghani and his chief executive and former presidential election rival, Abdullah Abdullah, but Stanekzai is expected to be confirmed by Afghanistan's parliament soon.