The incident happened shortly after jury selection for the hush-money trial was completed
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.30pm 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.
Several bombings have taken place in Afghanistan in recent months, including an attack on the Pakistan embassy earlier this month and a suicide blast near the Russian embassy in September. Both attacks were claimed by Daesh.
The incident happened shortly after jury selection for the hush-money trial was completed
The neighbourhood around the consulate was closed after the 60-year-old entered the premises, claiming to be armed with an explosive vest
The first of seven phases, Friday's vote covered 166 million voters in 102 constituencies across 21 states and territories
The winning image portrays Inas Abu Maamar sobbing while holding Saly's sheet-clad body in the hospital morgue
The attached properties include a residential flat in Juhu registered in the name of actor Shilpa Shetty
The crater of Mount Ruang flamed with lava against a backdrop of lightning bolts overnight after erupting four times on Wednesday
The majority of the casualties were in the provinces of Farah, Herat, Zabul, and Kandahar
In four days, Indian Customs seized more than 10.02 kg gold in different cases at Mumbai International Airport