At least 15 students are among 25 people killed by a roadside bomb in Logar province to the south of Kabul, the Afghan capital, officials said.
The blast happened as police officers inspected an overturned lorry in the district of Mohammad Agha on Thursday.
Four police officers were among the dead.
"Police went in the morning to see and open the road. As police arrived at the scene the truck exploded and unfortunately killed 21 civilians and four policemen," Zemarai Bashary, the Afghan interior ministry spokesman, said.
Police said that explosives hidden inside the vehicle were apparently remotely denoted as the police arrived.
Ghulam Mustafa, the Logar police chief, said it was not clear whether it was a planned attack against the police or if the explosives were being transported to the capital, Kabul, when the vehicle had crashed.
The children were travelling to school when they were caught in the blast.
Abdul Hameed Hamid, a district governor, said it was difficult to establish an exact death toll as many of the bodies were torn to pieces.
'Taliban strongholds'
Al Jazeera's Zeina Khodr, reporting from Afghanistan, said that the provincial authorities expected the death toll to rise.
"Logar is still a very dangerous place, it's approximately 25km south of Kabul, and we know that the Taliban does have strongholds there as well as other groups like Hezb il-Islami," said said.
No one has so far claimed responsibility for the attack.
Hamid Karzai, the Afghan president, condemned the blast as a "savage and anti-Islamic attack," his office said in a statement.
Attacks have increased across Afghanistan since US marines launched a major offensive last week against Taliban fighters in the southern Helmand province.
The Taliban has vowed to resist the offensive and hit back.
The Nato-led International Assistance and Security Force (Isaf) said on Thursday that two of its soldiers had been killed by a roadside bomb in the south of the country the previous day.
It did not identify the exact location of the attack or the nationality of the troops.