Deputy Interior Minister Mohammad Ayub Salangi said that weapons had been seized, including a rocket-propelled grenade launcher, three automatic rifles and a hand grenade.
Using his official Twitter account, Salangi said there were "no civilian or military casualties."
Kabul's police chief General Abdul Rahman Rahimi, speaking to reporters outside the guesthouse that was the target of the six-hour assault, said: "Before reaching their target all four attackers were killed."
The Taliban claimed responsibility for the attack in tweets on a recognised Twitter account. They referred to the target as "belonging to the occupiers," reiterating the insurgents' message that foreign installations are specific targets in the Afghan capital.
More From This Section
The attack came amid intensified fighting across many parts of Afghanistan since the insurgents launched their annual warm weather offensive a month ago. A Taliban attack on a guesthouse in another part of the capital earlier this month left 14 people dead, including nine foreigners.
The siege began late yesterday, with heavy explosions accompanying sporadic automatic rifle fire, and was focused on the Rabbani Guesthouse, which is favoured by foreigners as the area is in the heart of the diplomatic district and close to the airport.
The attackers apparently attempted to enter the hotel by firing a rocket propelled grenade at its heavy steel front gate. Part of the gate is burned, but it was not damaged enough to allow the militants entry. The hours of shooting seem to have marked a showdown as the militants sought cover and police waited for daylight to identify and move in on their targets.