Spain's government said an attack in a diplomatic area of the Afghan capital that killed at least six people, including two Spanish policemen, was "an attack on Spain."
The Taliban claimed responsibility for the car bombing and gunfire that began Friday and continued into Saturday, before security forces killed all of the assailants.
At least four Afghan policemen died in the attack, which took place near the Spanish embassy in Kabul. Several other people were wounded. A nearby hospital run by an Italian charity reported it had treated several victims for injuries.
Taliban spokesman Zabihullah Mujahid told VOA a guesthouse was the target because, he said, it was being used for military activities and intelligence sharing.
"We had been watching it for a long time and finally attacked it today. A large group of our Mujahideen assaulted this important target," Mujahid said. "It started with one of our men blowing up an explosives-laden car allowing others to enter the facility. A number of foreigners were present inside the building."
Witnesses said at least three attackers were involved.
In Washington, State Department spokesman John Kirby said despite the violence, the United States believes it must continue to work for a reconciliation between all parties in Afghanistan.
"Nobody wants to see violence of this sort in Kabul. It does underscore the fact that Afghanistan still remains a dangerous place and also underscores the urgency and the need for there to be continued support for President (Ashraf) Ghani and Chief Executive Officer (Abdullah) Abdullah towards an Afghan-led reconciliation process," Kirby said.
Friday's attack in Kabul followed a 27-hour siege of an airport military housing complex in southern Kandahar earlier in the week. At least 10 Taliban fighters equipped with suicide belts killed 54 people, including 39 civilians.