"An attack against civilians gathered for a cultural event in the Park Palace hotel in Kabul killed 14 civilians and injured several others," the United Nations Assistance Mission in Afghanistan (UNAMA) said in a statement.
A senior Afghan police official confirmed the toll.
"Fifty-four people were rescued by security forces," Kabul police chief Abdul Rahman Rahimi said after a large number of armed personnel swooped on the guesthouse, located in an up-market district and popular with international aid agency workers.
An Indian foreign ministry official said said that "unfortunately four Indians have died in the attack as per the information we have so far".
Prime Minister Narendra Modi had spoken with Afghan President Ashraf Ghani to offer his condolences, saying "We are one when it comes to fighting terror", he added.
"Three attackers have been killed. They didn't get the chance to detonate their suicide vests," Kabul deputy police chief Sayed Gul Agha Rohani told AFP. "We are still trying to identify the victims."
The US embassy in Kabul confirmed that an American citizen had been killed in the hours-long siege.
"We can confirm reports that a US citizen was killed in the attack on a guesthouse in Kabul," embassy spokesperson Monica Cummings told AFP.
"Our thoughts are with the families of the victims at this time. Out of respect for the families of those killed, we have no further information at this time."
Earlier on Wednesday evening, gunmen had stormed a guesthouse popular with foreigners, Afghan security officials said, with several people reportedly trapped inside as the Taliban pressed on with their annual spring offensive.
"Three to four gunmen entered Park Palace guesthouse in the evening. Security forces have been dispatched to the area," a senior security official told AFP on condition of anonymity.
Kabul police chief Abdul Rahman Rahimi, who was at the scene of the attack, said gunshots were heard from inside the guesthouse.
Roads leading up to the guesthouse were blocked by a large number of security personnel who arrived after the attack, according to an AFP photographer at the scene.
No group immediately claimed responsibility for the attack, but the Taliban, who have waged a 13-year war to topple the US-backed Afghan government, have attacked such guesthouses in the past.
Taliban insurgents launched their spring offensive across Afghanistan late last month, stepping up attacks on government and foreign targets.
This year's offensive marks the first fighting season in which Afghan forces are battling the insurgents without the full support of US-led foreign combat troops.
NATO's combat mission formally ended in December but a small follow-up force has stayed on to train and support local security personnel.
COMMENTS (5)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ