KABUL, AFGHANISTAN -- Islamic State militants set off an explosion at the entrance to a military hospital in the Afghan capital on Tuesday, killing at least seven people, a senior Taliban official said. It was one of the most brazen IS attacks yet since the Taliban took control of Afghanistan in the summer.

Among those killed were three women, a child, and three Taliban guards, said Taliban spokesman Zabihullah Mujahid. Five attackers were also killed, he said, adding that Taliban guards prevented them from getting into the hospital. He said the attack was over within 15 minutes.

"No one was killed inside the hospital," the spokesman said. He said Taliban guards thwarted IS plans to target medical staff and patients in the 400-bed facility.

He said Taliban special forces were subsequently deployed and searched the hospital and that a helicopter was used in the operation.

Health officials said 16 people were wounded in the attack on the Sardar Mohammad Dawood Khan hospital in Kabul's 10th district. Mujahid said five Taliban fighters were among the wounded.

Earlier, another Taliban official had said the attack was carried out by six men, and that two of them were captured.

During the attack, city residents had reported two explosions in the area, along with the sound of gunfire.

In recent weeks, IS militants carried out a series of bombing and shooting attacks. IS has stepped up attacks since the Taliban takeover of the country.

Correction:

Backstory: