Taliban spokesman Zabiullah Mujahid wrote on Twitter that suicide attackers had forced their way into a guesthouse for “foreign occupiers.”
Interior Ministry spokesman Sediq Sediqi said the guesthouse, located in the upscale district of Sherpur, was targeted by a car bomb. Residents reported the explosion was followed by gunfire.
The district emergency hospital said seven Afghans had been admitted there with injuries.
Residents said the area was cordoned off after the explosion and Afghan Special Forces were at the scene.
International security advisers said the building that was attacked was likely a guesthouse of the Spanish embassy. The embassy operates out of several buildings in Sherpur, some of which are used as guesthouses.
Sherpur is home to embassies, many high-ranking politicians and guesthouses of several international organizations.
The incident comes three days after the Taliban attacked the airport of the southern city of Kandahar. In the 27-hour battle that ensued, at least 61 people were killed, including 11 of the attackers.