An overturned truck carrying explosives has blown up on a road south of Kabul in Afghanistan, killing 25 people.

The truck blew up as authorities were trying to remove it.

It was loaded with firewood and was apparently overturned deliberately about 30km south of the capital in Logar province.

'In the explosion today 21 civilians and four policemen have been killed,' provincial police chief Ghulam Mustafa Mohsini said.

'The civilians include school students. Four others including three students and one man have been wounded,' he said.

The governor of the Mohammad Agha district, where the explosion took place, said earlier 12 bodies had been identified and that most of them were school students.

The blast was on a main road from southern and eastern Afghanistan that heads into Kabul.

Three shops were totally destroyed and windows smashed up to 1km away from the explosion, the district governor said.

Provincial government spokesman Din Mohammad Darwish said the explosives were hidden under firewood in the overturned truck.

'It seems that the explosives were remotely detonated as a crowd gathered around the truck in the morning. Our initial information is that 19 people, all of them schools students, have been killed and wounded,' he said.

The blast struck children heading to school. There was no immediate claim of responsibility for the attack.