Three guards died in the attack and another was injured, the interior ministry said.
The Taliban claimed responsibility for the assault.
All attackers were killed, said U.S. Ambassador James B. Cunningham in a statement, condemning the attack. He called on the Taliban to cease violence and “come to the table to talk to the Afghanistan government about peace and reconciliation.”
The palace is located in the Shash Darak district of Kabul, near the U.S. embassy and the headquarters of the International Security Assistance Force.
“We’re monitoring the situation right now,” said Maj. Will Griffin, an ISAF spokesman, during the attack. “We’ve heard reports of explosions and small arms fire. We’re taking necessary measures to ensure the safety of ISAF personnel and ISAF partners.”
A pair of tweets from the official ISAF media account highlighted the seriousness of the situation.
“CAMP LOCKDOWN at ISAF HQ: SHELTER IN PLACE,” one post said. The other read: “DUCK and COVER alarmed at @USEmbassyKabul.”
Coming a week after the international coalition handed over security, the attack was an early test of Afghan forces and their ability to maintain order.