Monday's attack by gunmen on a hotel frequented by Chinese businessmen in the Afghan capital resulted in at least three deaths.

The Islamic State (IS) group took on the responsibility of the attack.

According to Taliban sources, the attack took place at the Longan Hotel, a popular destination for Chinese and other foreign travelers.

Videos of the incident, which included smoke rising out of one level and gunshots, were posted on Twitter by a journalist in Kabul and verified by Reuters. A person was also seen attempting to flee the attack by jumping out of a hotel window.

Residents in the vicinity reported hearing a loud explosion followed by shooting at around 2.30 p.m. local time, according to Kabul police spokesman Khalid Zadran.

Since taking over control in August of last year, the Taliban assert that security has improved; but, there have been numerous bombings and other attacks, many of which have been blamed on the regional affiliate of the Islamic State group.

One kilometer from the incident site, Italian non-governmental organization Emergency NGO, which runs a hospital, reported receiving 21 wounded, three of whom were already dead.

An attack on "mischievous elements" according to a police spokesman in Kabul, resulted in the deaths of three attackers and the capture of one suspect.

"All the guests of the hotel have been rescued and no foreigner was killed. Only two foreign guests were injured when they threw themselves from an upper storey," chief Taliban spokesman Zabiullah Mujahid added on Twitter.

Two members of IS, according to a statement released on Monday, "attacked a big hotel frequented by Chinese diplomats and businessmen in Kabul, where they detonated two explosive devices hidden inside two bags."

The group said in a statement that one of the two fighters, who IS identified as Abu Umar and Abdul Jabbar, started detonating explosive devices and firing at hotel guests while the other started throwing hand grenades toward Taliban officers. The group claimed that 30 people were injured or killed.

A video that was shared on social media showed people climbing out of windows on the building's lower floors while the hotel sign, which was clearly visible in both English and Chinese.

In another video, massive flames and dense plumes of smoke could be seen shooting out of another area.

A bombing at the Pakistani embassy earlier this month and a suicide explosion close to the Russian mission in September are just a few of the recent attacks in Afghanistan. The Islamic State claimed responsibility for both attacks.

The Taliban, who took control of the country in August 2021 after U.S.-led foreign forces left, have declared they are committed to securing it.