At least 19 people were killed and 24 others wounded Wednesday by a blast at a madrassa in Afghanistan's northern city of Aybak, a doctor at a local hospital told AFP.
There have been dozens of blasts and attacks targeting civilians since the Taliban returned to power in August last year, most claimed by the local chapter of the Islamic State (IS) group.
The doctor in Aybak, about 200 kilometres (130 miles) north of the capital Kabul, said the casualties were mostly youngsters.
"All of them are children and ordinary people," he told AFP, asking not to be named.
A provincial official confirmed the blast at Al Jihad madrassa, an Islamic religious school, but could not provide casualty figures.
The Taliban, which frequently plays down casualty figures, said 10 students had died and "many others" were injured.
"Our detective and security forces are working quickly to identify the perpetrators of this unforgivable crime and punish them for their actions," tweeted Interior Ministry spokesman Abdul Nafay Takor.
Images and video circulating on social media -- which could not immediately be verified -- showed Taliban fighters picking their way through bodies strewn across the floor of a building.
Prayer mats, shattered glass and other debris littered the scene.
The Aybak doctor said some critically wounded patients had been moved to better-equipped hospitals in Mazar-i-Sharif, which is about 120 kilometres away by road.
"Those who are here... were mostly hurt by shrapnel and blast waves. They had some shrapnel on their body and face," he said.
- 'Senseless attack' -
The United States, which pulled troops out of Afghanistan last year after two decades, deplored the attack and the toll on children.
"The United States condemns this senseless attack against innocent civilians. All Afghan children have the right to go to school without fear," Tom West, the US special representative on Afghanistan, wrote on Twitter.
Aybak is a small but ancient provincial capital that came to prominence as a caravan stopping post for traders during the fourth and fifth centuries when it was also an important Buddhist centre.
There has been a lull of a few weeks between major blasts targeting civilians in Afghanistan, although several Taliban fighters have been killed in isolated attacks.
In September, at least 54 people -- including 51 girls and young women -- were killed when a suicide bomber detonated a device at a hall in Kabul packed with hundreds of students sitting a practice test for university admissions.
No group claimed responsibility for that bombing, but the Taliban later blamed the Islamic State and said it had killed several ringleaders.
In May last year, before the Taliban's return to power, at least 85 people -- mainly girls -- were killed and about 300 were wounded when three bombs exploded near their school in the neighbourhood
No group claimed responsibility, but a year earlier IS claimed a suicide attack on an educational centre in the area that killed 24.
The Taliban's return to power brought an end to their insurgency, but IS continues to stage attacks across the country.
The Taliban movement -- made up primarily of ethnic Pashtuns -- has pledged to protect minorities and clamp down on security threats.
Amnesty International called the blast "disturbing", adding in a tweet it was "yet another reminder to the world that the sufferings of Afghan people are far from over."