Armed men opened fire on Monday inside a hotel in central Kabul popular with Chinese nationals in an attack that ended when at least three gunmen were killed by security forces, the Taliban-run administration said.
Two foreigners were injured while trying to escape by jumping from the hotel balcony, Taliban spokesman Zabihullah Mujahid wrote on Twitter.
Kabul's Emergency Hospital, run by an Italian non-profit near the attacked hotel in the Shahr-e-Naw area, reported receiving 21 casualties - 18 injured and three dead on arrival.
Taliban sources said the attack was carried out at Longan Hotel where Chinese and other foreigners usually stay.
Videos posted on Twitter by a journalist in Kabul and verified by Reuters showed smoke billowing out of one of the floors amid sounds of gunshots, while a person was seen trying to escape the attack by jumping out of a hotel window.
Kabul police spokesman Khalid Zadran said the attack took place around 2:30 pm local time, with residents in the area saying they heard a powerful explosion followed by gunfire.
The attack came a day after China's ambassador met the Afghan deputy foreign minister to discuss security-related matters and sought more attention on the protection of its embassy.
China's state-run Xinhua news agency said the attack happened near a Chinese guesthouse and its embassy in Kabul was closely monitoring the situation.
The embassy did not respond to a Reuters request for comment.
The Taliban, which seized power after US-led foreign forces withdrew in August 2021, have said they are focused on securing the country.


Ukraine, Russia meet in Geneva as Trump piles new pressure on Kyiv
Tarique Rahman sworn in as Bangladesh's PM after landslide election victory
Jesse Jackson, civil rights leader and US presidential hopeful, dies at 84
Arab League condemns Israel's registration of lands in West Bank
11 Pakistani security personnel killed in explosion near Afghan border