Islamic State claimed responsibility for an attack on a military hospital in the Afghan capital, Kabul, on Wednesday in which gunmen dressed as doctors slipped into the facility and battled security forces inside the building for several hours.
The attack began when a suicide bomber blew himself up at the rear of the 400-bed Sardar Mohammad Daud Khan hospital and three attackers with automatic weapons and hand grenades entered the complex, security officials said.
The gunmen, dressed as medical personnel, had taken position on upper floors of the hospital and engaged special forces sent to the scene, officials said.
Security forces blocked off the area around the hospital, near a busy traffic intersection and special forces soldiers descended on to the roof of the main building from helicopters. As fighting went on, a second explosion was heard from inside.
"Our forces are there and there is heavy fighting," said defense ministry spokesman Dawlat Waziri. He said one attacker had been killed and another two were holding out, while one soldier had been killed and three wounded.
A spokesman for the public health ministry said at least three dead and more than 60 wounded had been taken to other hospitals.
A Taliban spokesman denied responsibility, saying the movement had "no connection" with the attack.
A statement from Islamic State's Amaq News Agency said its fighters had attacked the hospital. The group has mounted several high-profile attacks on civilian targets in Kabul over the past year, including several on prominent Shi'ite targets.
The raid on the hospital, across the road from the heavily fortified U.S. embassy, underlines warnings by government officials that high-profile attacks in Kabul are likely to escalate this year.
President Ashraf Ghani said the attack "trampled on all human values".
"In all religions, a hospital is regarded as an immune site and attacking it is attacking the whole of Afghanistan," he said in impromptu remarks during a speech for International Women's Day in Kabul.
The NATO-led Resolute Support mission said it was ready to assist Afghan security services.
Abdul Qadir, a worker at the hospital, told Reuters he saw one gunman dressed in a white doctor's coat take out a concealed AK-47 assault rifle and open fire, killing at least one patient and one hospital worker.
As the fighting went on, some patients climbed out of the building and could be seen sheltering on window ledges visible from outside the hospital, which treats military casualties from around Afghanistan.
The attack comes just a week after dozens of people were killed and wounded in coordinated attacks on a police station and an office of the intelligence service in Kabul.
That attack was claimed by the Taliban, who are seeking to expel foreign troops, defeat the U.S.-backed government and reimpose Islamic law after their 2001 ouster.
Away from Kabul, dozens of people have been killed over the past few days in fighting across Afghanistan, from Kunduz and Baghlan in the north to Farah in the southwest and Helmand and Kandahar on the Pakistan border in the south.