Suicide attackers fought security forces for around an hour and blew up a car bomb outside Afghanistan's presidential palace after infiltrating one of Kabul's most secure areas.
Fighting also took place nearby at the Afghan Ministry of Defence and the former Ariana Hotel, which is used by the CIA. The Taliban, which several days ago was preparing for peace talks with the US, claimed responsibility for the attack and suggested all three buildings had been targeted.
The assault, in the central Shash Darak district, took place at around 6:30am local time. Police said three or four gunmen jumped out of a vehicle and opened fire after being stopped by security forces trying to use fake documents to get through a checkpoint.
All the gunmen were killed, and one palace security guard was wounded, said a police spokesman.
The attack began on the palace's east gate as reporters gathered ahead of a media event with President Hamid Karzai, who was expected to talk about ongoing efforts to open peace talks with the Taliban.
It was not immediately clear whether Mr. Karzai was inside the building at the time of the assault. Schoolchildren walking to classes nearby were also caught in the exchanges.
Taliban claim responsibility
The palace is in a large fortified area of Kabul that also includes the US Embassy and the headquarters for the Nato-led coalition forces. Access is heavily restricted.
The Taliban said it carried out the attack in a text message to Kabul reporters from spokesman Zabihullah Mujahid. "Today at 6.30am a number of suicide bombers attacked the presidential palace, defence ministry and the Ariana Hotel," he said.
Talks between the US officials and the Taliban had been set to take place last Thursday in Qatar. But Afghan government anger at the fanfare surrounding the opening of the Taliban office in the Gulf state threw preparations into confusion.
The opening of the Taliban office was ostensibly a practical step to pave the way for peace talks to end Afghanistan's 12-year-old war. But the official-looking protocol surrounding the event raised angry protests in Kabul that the office would develop into a Taliban government-in-exile.
Meanwhile, a roadside bomb in southern Afghanistan killed eight women and one child as they travelled to celebrate a wedding engagement.
"A roadside bomb hit a civilian car in which eight women and one child were killed, and the driver and two other men were wounded," said Ghorzang Afridi, spokesman for the Kandahar provincial police.