But that success is crumbling across the south and in other battleground areas of the country, where hundreds of schools have been forced to shut down.
Sometimes the cause is fighting, sometimes it's intimidation from the Taliban.
Sometimes it's both, as in the case of the Loy Manda high school in southern Helmand province, part of the Taliban heartland.
When the Taliban waged an offensive last winter, the school in the Nad Ali district was caught in the fighting between the militants and Afghan government forces.
More From This Section
He's working toward reopening, but he had to get permission from the Taliban or else face their retaliation.
They said they would allow it, if only boys attend - no girls - and if they are only taught a curriculum meeting the Taliban's hard-line version of Islam.
Taliban mines from the time of the fighting still surround the school, and government forces are stationed just 40 meters from the school - a potential target for extremist attack.
That's the fate for an increasing number of children in the battlezone regions of Afghanistan.
In 2015, 615 schools in the country's 11 most volatile provinces had to close because of violence, according to the Education Ministry.
That was on top of the around 600 schools that remained shut down from the year before in those areas.
Almost half the 2015's school closures were in the final months of the year as the Taliban did not take their customary winter break.
Violence escalated across the warmer southern provinces, which were the hardest hit by closures, ministry's spokesman Mujib Mehrdad said.
The heaviest closures were in nearby Zabul, where more half the province's schools - 140 out of 242 schools - shut their doors.
The United Nations counted 25 students, teachers and other school staff killed in Taliban attacks or crossfire in 2015.