Afghan special forces are battling unidentified gunmen who have attacked a hospital in the capital, Kabul.
Locals heard two blasts, then gunfire. About 140 staff were inside at the time, a doctor, who fled the building, told the BBC. Many are still trapped.
Part of the hospital is run by the international medical charity, Medicins Sans Frontieres (MSF), and some of those working there are foreigners.
In Nangarhar province a suspected suicide bomber has attacked a funeral.
Dozens of people are thought to have been killed or wounded in that blast but casualty numbers are not confirmed. No group has said it carried out either attack.
In Kabul, eight people have been injured, including two children, officials said. Another 70 people, including women and children, have been brought out safely.
The hospital has a maternity wing run by MSF. Many foreign staff live in a guesthouse behind the hospital building and the doctor said he saw an explosion there too.
The Taliban, who signed a withdrawal agreement with the United States more than two months ago, have denied involvement.
In the past, similar attacks on foreign and other civilians in this mostly Shia area of the capital have been attributed to the Islamic State (IS) militant group, which has not yet issued a statement.
In 2017, IS gunmen disguised as medical staff attacked Kabul's main military hospital, prompting widespread shock and anger and raising questions about security. The authorities said about 50 people were killed.
But the Taliban also attack hospitals. Last September, 20 people died after a truck packed with explosives was detonated by militants from the group outside a hospital in southern Zabul province.