Gunmen wearing white coats to disguise themselves as health workers stormed the main military hospital in Kabul on Wednesday, opening fire in patient wards and killing more than 30 people, officials said.
A suicide bomber blew himself up at the entrance while three attackers burst inside Sardar Mohammad Dawood Khan military hospital and raced to the second and third floors.
Afghan commandos fatally shot one attacker but two others crouched under stairs and fired back in a gun battle that lasted hours before they, too, were killed.
Dawlat Waziri, a defense ministry spokesman, said that more than 30 people had been killed and dozens wounded.
The attack was met with condemnation across the world, from the State Department to human rights organizations and the Afghan presidential palace. Targeting medical facilities is a war crime under international law.
Hamidullah Mohib, Afghanistan's ambassador to Washington, called the attack "an abhorrent new low."
"Dressing in disguise to shoot at the sick and wounded is a cowardly, wicked act," Mohib said in a statement. "These are forces of evil the world must work together to defeat."
Even as the group is under pressure in Iraq and Syria, Islamic State loyalists in South Asia are fast becoming the deadliest militant force in the region. Last month the group claimed responsibility for a blast that killed more than 70 people at a Sufi shrine in Pakistan, while Afghan officials blamed the group for killing six Red Cross workers and kidnapping two others, who remain unaccounted for.
"Today's attack on the Kabul national military hospital is an unspeakable crime," Gen. John W. Nicholson Jr., commander of U.S.-led NATO forces in Afghanistan, said in a statement.
The U.S. military last year increased its use of airstrikes in parts of eastern Afghanistan that were Islamic State hotbeds, but the militant group has proven its resilience. Security experts and Afghan officials say the group includes a high number of militants from neighboring Pakistan.
The Sunni Muslim militant group has attacked a wide array of targets, including civilians, religious minorities, human rights workers and government facilities.
Named for a former Afghan prime minister, the 400-bed military hospital in Kabul's diplomatic quarter treats military casualties from across the country. In 2011, a Taliban suicide bombing at the hospital killed six people and wounded more than two dozen.
On Wednesday, hospital staff member Abdul Qadir was changing into scrubs before a busy shift that was to include about seven surgeries. He was about to enter the operating theater when the attack began.
"I heard gunshots and a guy with a gun wearing a white uniform fired at me," he said.
He saw a co-worker shot dead and watched the attacker enter a patient room and begin shooting, he said.
In a statement, Islamic State's Amaq news agency called the assailants "inghemasiyoun," an Arabic term meaning "those who immerse themselves," a phrase the group has previously used in Iraq and Syria to describe members of a special unit whose members are trained to fight to the death.
It was believed to be the first time the group has used the term to describe fighters in Afghanistan or Pakistan, perhaps indicating the regional affiliate's increasing sophistication.
Special correspondent Faizy reported from Kabul and staff writer Bengali from Yangon, Myanmar.
Follow @SBengali on Twitter for more news from South Asia
MORE WORLD NEWS
1:50 p.m.: This article was updated throughout with staff reporting.
7:05 a.m.: This article was updated with additional details about the attack, counter-terrorism efforts in Afghanistan and quotes from officials and residents.