At least 25 people were killed and more than 40 wounded during an attack by the Islamic State on the largest military hospital in the Afghan capital of Kabul on Tuesday, according to local officials. Gunfire and explosions resounded throughout the city late into the afternoon.

The attack, which included armed gunmen and at least one suicide bomber, targeted the 400-bed Sardar Mohammad Daud Khan military hospital in one of Kabul’s more well-to-do neighborhoods. Both wounded soldiers who fought for the former government and Taliban fighters were being treated at the hospital.

The hospital was rocked by two explosions and then heavy gunfire erupted between the attackers and the Taliban. One Taliban internal security official, who spoke to Al Jazeera anonymously, stated that a terrorist detonated a suicide belt at the entrance of the hospital and was quickly followed by several gunmen who attempted to storm the hospital.

“The attack was initiated by a suicide bomber on a motorcycle who blew himself up at the entrance of the hospital,” the official said, adding that all of the attackers were killed.

Among the dead Taliban was Hamdullah Mokhlis a senior commander who rushed to the scene and was killed in the fighting.

Al Jazeera reported that Hamdullah Mokhlis, a member of the hardline Haqqani network and an officer in the Badri Corps special forces, is the most senior figure to have been killed since the Taliban seized power in August.

“When he got the information that Sardar Daud Khan Hospital was under attack, Maulvi Hamdullah (Mokhlis), the commander of the Kabul corps, immediately rushed to the scene,” the Taliban media official said.

“We tried to stop him but he laughed. Later we found out that he was martyred in the face-to-face fight at the hospital,” he added.