At least three people were killed and about 20 children wounded when a Taliban truck bomb detonated near a rural police station and partially destroyed a nearby religious school, Afghan officials said.
The early morning attack happened in Alishing district in eastern Laghman province, said interior ministry spokesman Nasrat Rahimi.
"Three people including two security forces were killed and 27 were wounded," he added.
According to Asadullah Daulatzai, spokesman for the provincial governor, the bomb exploded outside a police station and severely damaged a nearby madrassa, or religious school.
"The students were wounded by flying glass," he said, adding about 20 students were hurt.
Ezatullah, an injured 10-year-old, said the blast was "huge and loud".
More From This Section
"I was in class with my friends reciting the Koran when we saw a red truck rushing toward us. For a moment everything went dark, and when I woke up I found myself in the hospital," he told AFP.
Six police officers were wounded in the attack.
The Taliban later claimed responsibility for the blast in a statement sent to media, saying the bomb killed dozens of Afghan security forces.
As the violence worsens, its impact on the children has been disproportionate across war-torn Afghanistan.
According to the UN Children's Fund the number of attacks against Afghan schools tripled last year compared to 2017.
By the end of 2018, more than 1,000 Afghan schools had been shut due to conflict.
The attack in Laghman comes a day after a helicopter crash in northern Balkh province killed at least seven Afghan military personnel, officials said.
Afghanistan is currently awaiting the results of the first round of presidential voting, which took place last month.
Polling was marred by several small-scale attacks claimed by the Taliban.