MARJA, Afghanistan -- The headmaster of the boys' school in this corner of southern Afghanistan has savored the past three years, a rare run of uninterrupted school terms that filled his classrooms and drew students from miles away.
But experience has taught him not to count on the good times lasting long.
Over just 12 years, Abdul Aziz, 50, has seen at least two anti-education governments come and go. He opens his school's doors when the local politics allow it, but with all the volatility he cannot attract good teachers or even wheedle the provincial education department to send him enough books. His school is cold in winter, scorching in summer and ill-supplied year round, but at least it is open.
"When the Taliban came to power in the 1990s we lost a lot of students and a lot people left Marja," he said. "Then in 2002 after the Taliban fled, people came back and the schools reopened until the Taliban came back again in 2006, and then the schools closed. Then we reopened in 2010 when the Marines came."
His school stands as an example of how the American troop surge in Helmand Province improved people's lives in places like Marja, once a stronghold of the Taliban. It also, however, shows the limitations of what can be achieved in rural southern Afghanistan, even with the West's vast resources at work.
A combination of insecurity, logistical hang-ups and corruption most often keeps the schools that do manage to open their doors from being adequately equipped or organized, and many parents are still wary of sending their children to them.
"This is not only the story of Marja -- this is the story of all of rural Helmand," said Nasima Niazi, a member of Parliament from Helmand, who taught for years in the province's schools before she ran for office.
Still, there are now 140,000 children registered in the province's schools, according to the provincial education department, which is an astonishing number given that in 2002, when Ms. Niazi started teaching again, there were just 75 students in the high school in Lashkar Gah, the provincial capital.
The situation in Marja is counted as a success, too, though a tenuous one. With 9 out of 15 schools open and 5,000 children attending class, there is no comparison to three years ago. But families here are always ready to pull their children out of class because of ingrained fear of reprisal from the Taliban. That fear lives on despite an effort by some Taliban to improve their image by allowing boys' schools to stay open in several areas of Helmand, said Mohammed Nasim Safi, the head of the provincial education department.
Often, now the barrier is the entrenched anti-education biases among the rural population, Mr. Safi said. Helmand, which is steeped in conservative Pashtun culture, has among the lowest literacy rates in the country with 8 percent of men and far fewer women able to read in contrast to a 43 percent literacy rate for men nationwide, according to rough statistics used by the American military in Helmand.
"Most of the closed schools are either in the areas where the government presence is zero or in areas where people are not interested in education and sending their children to school," he said, noting that of the 336 schools in the province, 185 are open.
State-run education in rural Afghanistan has had a troubled history after a slow and cautious start in the 1950s under the rule of Prime Minister Sardar Mohammad Daoud Khan and Mohammad Zahir Shah, the former king. When the Communists came to power in 1978, they aggressively pushed an education campaign that aroused the wrath not only of country dwellers, but of the mujahedeen, who saw state education as an anti-Islamic, foreign import.
The mujahedeen burned thousands of schools in the 1980s and early 1990s and killed thousands of teachers, according to a report on the development of the Taliban's education policy by the Afghanistan Analysts Network, a research group in Kabul.
When the Taliban came to power in 1996, they violently discouraged both boys and girls from attending school. In 2001, after the invasion by American and allied forces, a renewed emphasis on education again met with derision from rural Afghans, but slowly that has changed. Many parents now desperately want their children to learn to read and write and do math so that they can better help support the family.
The headmaster, Mr. Aziz, runs the Block 5 school in Marja, which stands at the intersection of two dirt roads. Its oblong one-story buildings face each other across a weed-ridden yard with a rusted seesaw and swing set. In early winter, a chilly wind rustled through the grass and swept past the open doors of the classrooms where the children shivered at ancient wooden desks.
The boys -- there are no schools for girls in Marja -- all lack something. Some have a notebook but no school bag or shoes; others have shoes but no notebook.
"We have books for first, second, fourth and sixth grade, but not enough for third grade," Mr. Aziz said.
Amanullah, 12, who was wearing a wool hat pulled over his ears and a jacket that was too large for him, watched as his teacher, a gray-bearded man wearing a hearing aid, spoke loudly to the students. In the next classroom, there was a fierce instructor teaching the Pashto language with the aid of a switch, which he periodically whipped through the air in a menacing fashion as the children watched him nervously.
"I'd like to be a doctor," said Amanullah, who like many Afghans uses only one name, and then added, "or an engineer."
Both are remote possibilities for a boy from rural Helmand, but he does not lack for perseverance. He rises before dawn to help his father with chores and then walks two hours to school and two hours back each night. His father has taken on Amanullah's share of the work in the fields so that he can go to school.
Mr. Aziz said he was angry that the Marines had not done more to help them.
"The kids should be a priority," he said. "The foreign soldiers have all the facilities at their disposal, they have air-conditioning 24 hours a day, seven days a week in their rooms. These kids? Look at their feet, some are not wearing anything on them."
In fact, between 2009 and 2012, more than $22.4 million poured into Helmand's education system through the provincial reconstruction team from Danida, a Danish aid organization; U.S.A.I.D.; and the United States military's commander emergency response program. Another $9.4 million is budgeted for 2013, but many teachers in the countryside say the aid does not reach them.
"Some children come from very remote villages. The Marines provided students in another school with some bicycles, but they didn't give my kids anything -- my kids were very disappointed," Mr. Aziz said.
The children come. The zeal for education is among the most moving developments in this poor area, and perhaps more than anything else a sign of hope that even if the Taliban return, they will not be able to fully dismantle the education system now that it has popular support.
On the chilly winter day in Marja, even the school guard, Koko Jan, spoke about how important it was to have an education. He can write only his name.
As he watched a reporter take notes at the school, he looked wistful and said, "I wish I could write as fast as you."
Habib Zahori contributed reporting.
This article originally appeared in The New York Times.