Gunmen disguised as police attacked a hospital in the Afghan capital Kabul on Tuesday, killing 16 people including two newborn babies from a maternity clinic run by the international humanitarian organisation Doctors Without Borders.
In a separate attack the same day, a suicide bomber struck the funeral of a police commander, attended by government officials and a member of parliament, in the eastern province of Nangahar, killing at least 24 people and injuring 68. Authorities said that toll could rise.
Islamic State Khorasan, the Afghan affiliate of the Islamic State militant group, claimed responsibility for the Nangahar bombing, the SITE Intelligence Group reported. Reuters could not immediately verify the report by SITE, which tracks online jihadist activity.
There was no immediate claim of responsibility for the Kabul attack. The Taliban, Afghanistan's main Islamist insurgency group which says it has halted attacks on cities under a US troop withdrawal deal, denied involvement in both.
The Islamic State militant group operates in Nangahar and has carried out a number of high-profile attacks in Kabul in recent months. On Monday security forces arrested its regional leader in the capital.
The violence, as the country battles the coronavirus pandemic, risks derailing movement towards US-brokered peace talks between the Taliban and an Afghan government long sceptical of the insurgents' renunciation of attacks.
Ministry of Interior photos showed two young children lying dead inside the hospital. 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 had survived and had been moved to an intensive care unit at another hospital.
President Ashraf Ghani condemned the attacks and said he had ordered the military to switch to offensive mode rather than the defensive stance it had adopted as the United States withdraws troops and tries to broker the talks.
"In order to provide security for public places and to thwart attacks and threats from the Taliban and other terrorist groups, I am ordering Afghan security forces to switch from an active defence mode to an offensive one and to start their operations against the enemies," he said in a televised speech.
Meanwhile National Security Advisor Hamdullah Mohib said on Twitter: "there seems little point in continuing to engage Taliban in peace talks".
In a statement, US Secretary of State Mike Pompeo condemned "the two horrific terrorist attacks" in the strongest terms, noted the Taliban had denied responsibility and said the lack of a peace deal left the country vulnerable to such attacks.
Pompeo also described the stalled peace effort, which planned for intra-Afghan peace talks to begin on March 10 but have yet to occur, as "a critical opportunity for Afghans to ... build a united front against the menace of terrorism."
The Pentagon declined comment on Ghani's stated intent to restart offensive operations, saying only that the US military continued to reserve the right to defend Afghan security forces if they are attacked by the Taliban.
Mothers, Children, Nurses
The Kabul attack began in the morning when at least three gunmen wearing police uniforms entered the Dasht-e-Barchi hospital, throwing grenades and shooting, government officials said. Security forces had killed the attackers by the afternoon.
"The attackers were shooting at anyone in this hospital without any reason. It's a government hospital, and a lot of people bring in their women and children for treatment," said Ramazan Ali, a nearby vendor who saw the start of the attack.
The 100-bed government-run hospital hosted a maternity clinic run by Doctors Without Borders, also known by its French name Médecins Sans Frontières (MSF).
Just hours before the attack, MSF had tweeted a photo of a newborn in his mother's arms at the clinic after being delivered safely by emergency caesarean section.
Interior and health ministry officials said mothers, nurses and children were among the dead and wounded.
Soldiers ferried infants out of the compound, some wrapped in blood-stained blankets, and officials said 100 people were rescued, including three foreigners.
The neighbourhood is home to many of Afghanistan's Hazara community, a mostly Shia Muslim minority that has been attacked by Sunni militants from Islamic State in the past, including at a March ceremony commemorating the death of one of its leaders.
Countries including the United Kingdom, Germany, Turkey and Pakistan released statements condemning the violence.
Last week, security forces killed and arrested several members of an Islamic State cell that authorities said was responsible for a number of attacks in Kabul including one on a Sikh temple in March. A roadside blast in the capital on Monday, which wounded four civilians, was claimed by the group.