Gunfire started around 6:30 a.m. inside a heavily guarded area near the east gate leading to the palace, next to the Afghan Ministry of Defense and the former Ariana Hotel, which former U.S. intelligence officials have confirmed is used by the CIA.
A car bomb then exploded trying to enter the area. About 20 journalists took cover behind a religious shrine, pulling a schoolboy off the street who had been caught in the open on his way to school.
Taliban spokesman Zabihullah Mujahid claimed responsibility, saying in a text message the militants had "brought death to the enemy" with a suicide attack. He later suggested in an emailed statement that all three buildings had been targeted, saying the attack came "near the Ariana Hotel, the important CIA base, and also the presidential palace and Ministry of Defense."
Smoke could be seen coming from the area of the hotel, but there was no immediate indication any of the buildings were hit in the attack.
Mujahid claimed the attackers had inflicted "heavy casualties," but Afghanistan's Kabul division army commander Gen. Kadam Shah Shahim said he knew of no deaths among security forces or civilians.
He said his forces killed all of the attackers, three or four men who had jumped out of a car and opened fire.
Police had no immediate comment.
Lt. Col. Frank Hoelzner, a spokesman for the NATO coalition, said he had no immediate information but that the headquarters had not been affected by the attack. The U.S. Embassy was not immediately available for comment.
The Taliban have indicated they are willing to open peace talks with the U.S. and the Afghanistan government and just last week opened an office in Qatar for possible negotiations.
But at the same time they have not renounced violence and attacks have continued across Afghanistan.
Associated Press writers David Rising and Amir Shah contributed to this report