SPIN BOLDAK, Afghanistan - The headmaster knew violence could strike his all-boys high school at any moment. It was why he spent three nights camped out in a first-floor classroom before last fall's parliamentary elections.
But his anticipation didn't dull the surprise of the dinnertime blast from a Taliban bomb.
"It was so strong we thought that the building would collapse," Noor Mohammad recalled. Windows were shattered. Smoke hung in the air. "I was dizzy. It was like falling off a roof."
No one was injured, but it wasn't the first time the Ali Nika school was struck. Nor would it be the last.
Schools in Afghanistan sit at the nexus of education, politics and violence. Their openings are heralded by many as signs of progress in a country stunted by conflict; their students are stewards of Afghanistan's future who might one day lift it out of poverty. But schools here, as in many other countries, also serve as traditional polling places - and so become targets of Taliban violence, especially during election years.
The number of attacks on schools almost doubled in the first three months of this year compared to a year before, according to the United Nations. The spike followed 192 such attacks in 2018, triple the number from 2017. Almost half of the incidents in 2018 were at schools hosting polling places for elections in October.
Now many worry the presidential election slated for late September will bring another surge of violence. The Taliban this month promised to disrupt the elections, warning civilians to stay away from campaign rallies, and has stepped up its attacks on government targets to gain leverage in peace talks with the United States.
"It is unfair, because children have a right to education, and of course they are losing this opportunity," Afghan Education Minister Mirwais Balkhi said in an interview last month. "Schools are for the common good, and no one should harm them - not the government, not the Taliban."
Sometimes schools are directly targeted. Other times, they're collateral damage in attacks on nearby government buildings.
In the weeks following the October attack on the Ali Nika school, small donations from teachers and students helped fix the shattered windows and keep out the cold. Mohammad, the headmaster, said not a single day of classes were missed.
"As Afghans, we are accustomed to such incidents," he said.
The school has faced threats for years. It is also a short drive from the border with Pakistan, and fighting border guards have occasionally sent stray bullets into the school's walls. Its proximity to the police station next door puts it at risk of frequent insurgent bombardments.
"We'd be safer if we were farther away," Mohammad said.
The school's windows are still shattered from a bombing last month on the street outside. No one claimed responsibility for the attack.
Mohammad now stands watch twice a day as his students file home after the final bell. He makes sure that they all turn right, toward the mud-walled huts and dusty auto parts dealers, rather than left, toward the police station.
In June, Balkhi, the education minister, sent a letter to Afghan President Ashraf Ghani, chief executive Abdullah Abdullah and the country's election commission, demanding that no schools be used for polling in the election.
"We have many other options," he said in a recent interview, arguing that mosques and community centers should be used instead.
"Without elections we can survive, but without education we cannot," he said. "If you do not educate the young people of Afghanistan, there will be no democracy, no development, no proper state, no proper government."
He said his letter went unanswered.
The election commission says it has no choice. Schools are often the only public spaces available with a known permanent address and reliable supplies, structures and security, commission officials said, and the use of mosques and private homes in the past has led to corruption and mismanagement. (There are no classes in Afghan schools on election days.)
The commission plans to have 5,388 polling sites around the country this year, "70 to 80 percent of which will be schools," according to Abdul Aziz Ibrahimi, a commission spokesman.
"The lives of the students are valuable to us, but elections are a national process," Ibrahimi said. "We have no other options."
Some critics have called for the Sept. 28 election to be postponed because of the threat of violence, reports of poor preparation, or possible disruption of the peace talks. Ghani and his running mate have insisted that the vote go ahead as planned.
In a statement posted online on Aug. 6, the Taliban denounced the election as an illegitimate "ploy" put on by foreigners and "sham politicians." They warned "fellow compatriots" to "stay away from gatherings and rallies that could become potential targets."
"Our goal is to prevent the fake election process," Taliban spokesman Zabiullah Mujahid said by WhatsApp voice message in response to questions about attacks on schools. "If a school or any other place is used in the election process, it will not be our fault."
Previous Afghan elections have been marred by allegations of irregularities. This year, some Afghan leaders and foreign observers are concerned that a contested election, along with ensuing violence, could complicate negotiations with the Taliban.
The United States and the Taliban have been in talks for months on an initial peace deal that would require the withdrawal of thousands of U.S. troops in exchange for a cease-fire and the promise of direct talks between the Afghan government and the Taliban, which has refused to negotiate with Afghan leaders.
Experts say the Taliban's stepped-up attacks on schools will bode poorly for Afghanistan's future. School attendance dropped by 50 percent in most provinces during last year's parliamentary elections, said Balkhi, the education minister.
"Students are already under so much stress in Afghanistan," said Michael Kugelman, a South Asia expert at the Wilson Center, "but if you now have this cascading threat about getting physically harmed when you're at school, I think that will just make the educational system all the more perilous and vulnerable."
More Afghan civilians were killed or injured on election day than on any other day in 2018. Among the many sites hit by the Taliban in the days leading up to the October elections was a primary school in Shah Mahmoud, a modest village outside of Spin Boldak.
The school serves 311 students, ages 7 to 16. Teachers and local elders said the Taliban had put out a warning days earlier that the school would be attacked if it were used as a polling site.
On Oct. 26 - the day before elections in Kandahar - polling booths and ballots were moved into the school. That evening, two blasts tore off the building's roof, shattered desks and reduced books to ashes. None of the election materials were damaged.
Naazdanah, the 11-year-old daughter of a shopkeeper, heard the blasts from her home in a neighboring village. She knew immediately it was an attack on her school, she said.
"They're the Taliban. They don't like education; they're jealous," she said. Nevertheless, she's determined to continue her education.
"I have no fear," she said. "I will always go to school to see my friends, my teachers and to learn."
The Washington Post spoke to the students with the permission of their parents and the village elders. The Post is identifying the children by only their first names out of concern for their safety.
Sixteen-year-old Ismatullah, an aspiring civil engineer who attends the school, was familiar with violence.
His family had fled from nearby Panjwai district after his school was destroyed because the Taliban had been using it as a militant hideout. Still, Ismatullah was dismayed to see the violence follow him.
"School should be a place for education," he said. "It is not a battlefield."
Despite the attack, more than 4,000 voters turned out to cast their ballots at the schoolhouse, the line stretching far down the road, according to Budradin Badrad, the education officer of Spin Boldak.
This year, teachers and village elders say they will continue as planned with elections and with classes.
"We have no other choice," said Shah Mahmoud, a village elder. "Education is our only way to escape."