Gunmen stormed a maternity hospital in the western part of the Afghan capital Kabul, setting off an hours-long shoot-out with the police and killing 16 people, including two newborn babies, their mothers and an unspecified number of nurses.
Photos from the Ministry of Interior Affairs showed two young children lying dead inside the hospital in Kabul.
An image showed a woman who had been killed lying on the ground still holding tightly to her baby, who a nurse in the unit confirmed to Reuters news agency had survived and had been moved to an intensive care unit at another hospital.
Security forces earlier cordoned off the area as they evacuated more than 80 women and infants from the hospital, where medical charity Doctors Without Borders (Medecins Sans Frontieres, or MSF) runs a maternity clinic.
Interior ministry spokesman Tareq Arian said three foreign nationals were among those safely evacuated, without elaborating.
It was unclear why the maternity hospital in Dashti Barchi, a 100-bed facility, was targeted – an attack Arian said was an “act against humanity and a war crime”.
At least three attackers wearing police uniforms entered the hospital, throwing grenades and shooting, officials said.
A paediatrician who fled the hospital told AFP news agency he heard a loud explosion at the entrance of the building in Dashti Barchi, a mostly Shia neighbourhood that has seen past attacks by the ISIL (ISIS) armed group.
“The hospital was full of patients and doctors, there was total panic inside,” the doctor said, asking not to be named.
In the evening hours, husbands, fathers and family members of the hospital’s patients gathered around the hospital, desperate for news of their loved ones.
A man read out the names of those who had been evacuated to other hospitals.
The neighbourhood is home to many members of Afghanistan’s Hazara community, a mostly Shia Muslim minority that has been attacked by ISIL in the past, including at a Kabul ceremony commemorating the death of one of its leaders in March.
Rights group Amnesty International condemned both the attacks.
“The unconscionable war crimes in Afghanistan today, targeting a maternity hospital and a funeral, must awaken the world to the horrors civilians continue to face,” the group tweeted.
“There must be accountability for these grave crimes.”
Countries including the United Kingdom, Germany, Turkey and Pakistan released statements condemning the violence.
Also on Tuesday, in a suicide bombing in eastern Nangarhar province, an attacker targeted the Khewa-district funeral of a local pro-government militia commander and former warlord who had died of a heart attack on Monday night, said Attahullah Khogyani, spokesman for the provincial governor.
The interior ministry said the final casualty toll included 24 killed and 68 wounded. The wounded were brought to the Nangarhar provincial hospital, said hospital spokesman Gulzada Sangar.
Khogyani added the dead included Abdullah Lala Jan, a provincial council member, while his father Noor Agha, a politician, was wounded in the attack.
According to Zabihullah Zemarai, another provincial council member, dozens of people, including, politicians, provincial council members and locals had gathered for the funeral of Shaikh Akram, the militia commander.
Taliban spokesman Zabiullah Mujahid tweeted that the Taliban was not involved in the attack.
ISIL claimed responsibility for the attack in Khost, which killed a child and wounded 10 people.
The bomb was placed in a cart at a local market and remotely detonated, said Adil Haidari, spokesman for the provincial police chief.
ISIL also said it was behind a spate of attacks on Monday in Kabul when four bombs, one placed under a garbage bin and the other three by the roadside, went off in the northern part of the city, wounding four civilians, including a child.
The Afghan intelligence service said in a statement late Monday that the agency arrested an ISIL leader in the region, Zia-ul Haq, also known as Shaikh Abu Omer al-Khorasani.
Afghanistan is also facing violence around the country from the Taliban, even as the United States tries to usher in peace talks after signing a troop withdrawal agreement in February with the armed group.
Taliban spokespeople say they are holding back from attacking urban centres and their operations are aimed at government security forces.