In Kandahar, the walk to lessons seems too dangerous and the pay too low to risk a life
The threat of kidnapping and the risk of being killed on the way to school is putting parents in Afghanistan off letting their children attend.
Schools in the south of the country are in crisis, says Unicef: nearly a third of them shut because of insecurity and a lack of teachers.
Girls have been particularly hard hit by a shortage of female teachers, nearly seven years after the fall of the Taliban regime which banned them from school.
However, classes in Kandahar, the second largest city in the country, are still full of girls. Most of them walk to school wearing burkhas, which they tuck under their desks during lessons, often given by male teachers.
At the Shalid Abdul Ahad Karzai school in Kandahar, the headteacher, Dawood Shah, admitted that many parents were deeply worried. "The main problems are explosions, kidnappings and assassinations," he said.
Two years ago 16 pupils died when a bomb exploded outside the school.
Some pupils have been withdrawn because their parents fear them being targeted for abduction.
A more everyday problem is intimidation of girls by men who approach them as they walk home. In deeply conservative Kandahar, girls' education is still opposed by many men.
At Shalid Abdul Ahad Karzai, children are taught in single-sex classes: the boys attend lessons in the morning and the girls come in for the afternoon.
Anita, 16, admitted that some of her classmates had stopped attending because of the threats.
"It is difficult, but we have to come to classes," she said. "It is our duty to be educated.
"Our families are happy that we come to school, but they worry about our security."
Afghan education chiefs are trying to get more community involvement in managing schools as a way of protecting buildings, staff and pupils from attack.
In remote areas, the government's control of the education system has broken down after teachers fled. Informal schooling at local mosques is the only teaching available in districts where there are no female teachers.
Taliban guerrillas were blamed for a spate of attacks two years ago, including some school burnings.
Afghan officials blamed the Taliban for the murder of a female teacher in Kandahar last year and for the burning down of a school last week.
However, Unicef officials say the main problem is the insecurity in lawless areas and the risk of children being hurt or killed during fighting between guerrillas and Afghan government or Nato forces.
An epidemic of kidnapping children for ransom and intimidation of schoolgirls on their way to and from classes has also played a part in making education dangerous for pupils in the southern provinces - including Kandahar and Helmand, where British troops are fiercely fighting a Taliban insurgency.
Sam Mawunganidze, resident programme officer for Unicef in Kandahar, said: "The community wants girls to go to school, but they often don't have female teachers. Most women teachers are not confident about going outside the city."
According to Unicef figures, 136 out of 326 schools in Kandahar province are closed, most in remote rural areas that have seen some of the fiercest fighting of the past couple of years.
Teachers, whose salaries were recently raised from about pound;15 to pound;20 a month, have simply quit in many lawless areas.
Mr Mawunganidze said the looting and burning of schools was often blamed on the Taliban.
"How can you put your life in danger for pound;20 a month?" he said. "It isn't enough to live off.
"The opium poppy harvest pays that much daily."