Local police officers sit in the home where U.S. Army Staff Sgt. Robert Bales murdered many of the 16 Afghan civilians he killed in March 2012. (Kevin Sieff/The Washington Post)

This was once the front line of the U.S. war in Afghanistan. More than 79 international troops, mostly American, were killed in the district, a parched cluster of villages that was the heartland of the Taliban.

Today, the insurgents are gone, beaten back by Afghan forces and rejected by villagers. But there is no sign of the flourishing state many hoped would emerge.

Police man checkpoints, but there is no traffic. They carry guns but say they lack bullets. Old U.S. blast barriers and barracks are fossilizing in the desert, covered in graffiti that alludes to a decade of haunting deployments.

At a time when many Americans are asking whether the Afghan war was worth fighting, Panjwai shows how dramatic some of the security gains have been — but also how little has been done to consolidate the presence of the state. It is a former insurgent haven now free of insurgents. It is also a shelled-out constellation of villages ignored by Kabul and patrolled by some of the government’s least reliable employees, many of them younger than 17.

“The Taliban once owned this village, but now it is ours,” said Amadullah, a local police commander, extending his right arm toward a group of mud-brick homes. But the air quickly came out of his defiance. “Unfortunately, nothing is guaranteed in Afghanistan.”

The risk posed by Afghanistan’s weak democratic institutions has become alarmingly evident in recent weeks as one of the two candidates in the presidential runoff threatened to reject the results of the vote count, raising fears of prolonged political stalemate or even civil war.

Panjwai is known to many Americans as the place where Army Staff Sgt. Robert Bales murdered 16 residents in 2012, in one of the worst U.S. atrocities of the war. To the Taliban, it has long been sacred ground. The insurgents emerged here in the early 1990s. Their leader, Mohammad Omar, spent time in Panjwai after founding the organization.

When President Obama announced his troop surge in 2009, Panjwai was one of the first places where soldiers were dispatched. By then, the Taliban had taken over dozens of villages and turned them into makeshift command centers and bunkers. Between 2009 and 2014, the Taliban buried more than 5,000 roadside bombs here, according to the U.S. military.

“They came to me and preached about the cause. They were strong in Panjwai then, and I needed money to feed my family,” said Jan Mohammad, 25, one of many young men recruited by the Taliban. He fought on their side for two years before being detained by U.S. forces. He was later released and left the insurgency.

One American unit after the next waged war on the insurgents, defusing improvised explosive devices (IEDs) that were then replaced, and dropping bombs on a Taliban leadership that seemed to regenerate every year. U.S. forces failed to gain the trust of the district’s population.

And then Bales walked off his base in the middle of the night March 11, 2012, and gunned down the 16 civilians, most of them women and children.

Aktar Mohammad, a resident of Panjwai, stands in a house where U.S. Army Staff Sgt. Robert Bales murdered numerous civilians, most of them women and children. (Kevin Sieff/The Washington Post)

“That’s when the Taliban preaching really increased,” said Aktar Mohammad, who lives a few yards from one of the homes targeted by Bales. “They told us the Americans were here to kill our children and our women.”

Bales was sentenced last year to life in prison. The families of the victims left Panjwai; their homes are still pocked with bullet holes. In one, where several children were killed, a tattered first-grade textbook lies on the floor. The victims were part of a larger exodus out of the district during years of unremitting violence.

Vulnerable Afghan troops

By last summer, responsibility for combat operations shifted from U.S. to Afghan troops, dozens of whom were killed, mostly by roadside bombs. Without modern body armor or bomb-proof vehicles, the Afghans were particularly vulnerable.

Around that time, a group of Afghan elders declared their opposition to the Taliban. For years, Panjwai residents had offered hospitality to insurgents and Americans, afraid that shutting out either group would make them targets. But the elders said they would no longer offer the same degree of assistance to the Taliban.

“We were tired of living between two countries — one controlled by the government and the Americans, and the other controlled by the Taliban,” said Mohammad Osman, 75, an elder.

Afghan troops continued to die throughout the summer fighting season. The Afghan brigade commander, Gen. Ghulam Murtaza, said his unit lost count of how many of its vehicles were destroyed by roadside bombs. Everyone wondered: What would happen in 2014, when the Taliban pledged a brutal campaign to disrupt Afghan presidential elections?

A local police officer stands in a former American base in Panjwai. (Kevin Sieff/The Washington Post)

An officer patrols a farm in Panjwai. (Kevin Sieff/The Washington Post)

A long foot patrol last month with the local police in Panjwai offered at least a partial answer. The Afghan police walked through village after village, entering old Taliban command centers, crossing culverts where IEDs were once buried. But not a single bullet was fired at them, and not a single bomb exploded.

Amadullah, their commander, who like many Afghans uses one name, attributed the relative peace to the role of the local police. They are recruited from Panjwai and are therefore able to “identify the Taliban and gain the trust of the locals” in a way that Americans and even Afghan soldiers, who hail from other parts of the country, could not, he said.

Tribal elders say their decision to stand up to the Taliban was the key factor in keeping the insurgents from returning for this summer’s fighting season. Others credit a large-scale Afghan army operation last year that targeted top insurgents. And still others point to the Taliban’s internal divisions.

“It’s hard to boil it down to one thing,” said Gen. James Rainey, the deputy U.S. commander in southern Afghanistan. He called the district’s security gains “a model of what could be” in southern Afghanistan.

An opportunity for Kabul

Whatever the cause, Panjwai now represents an opportunity for the Afghan government to capitalize on the Taliban’s absence.

If the district remains a wasteland, unsupported by the government, insurgents could easily return, playing again on local disaffection with authorities. This summer, they have regrouped in some of the districts around Panjwai, such as Maiwand and Band-e-Timor. U.S. and Afghan officials have intercepted phone calls in which insurgents have expressed a desire to retake Panjwai.

A government development effort could serve as proof that the Afghan state offers more than the Taliban. Right now, there’s no evidence of that.

“The existential threat to Afghanistan is the government of Afghanistan. You need to have a government to connect the people to — and that’s not something that exists right now,” Rainey said.

Several years ago, the U.S. government would probably have launched a massive reconstruction program in the district. But as the war winds down, those funds are no longer readily available.

The infrastructure the U.S. government built in Panjwai during the height of the war was destroyed. Clinics and schools are charred and hollow. A huge portion of the district’s homes are uninhabitable, riddled with holes from American bombardments or Taliban crossfire.

Haji Mohammad Wazir sits with his son in the Afghan city of Kandahar. Eleven members of Wazir's family were murdered by Army Staff Sgt. Robert Bales in Panjwai in 2012. (Kevin Sieff/The Washington Post)

“The investment is going to be done by the Afghan government,” Rainey said. “We’re not in that business anymore.”

For their part, Afghan officials and tribal elders express pessimism that the funds will arrive to rebuild the city.

“Most of the homes are destroyed, and the people don’t have enough money to rebuild them,” said Haji Fazl Mohammad, the district governor. “We don’t have the money to help them, and the government in Kabul didn’t give us anything.”

On their patrol last month, the Afghan police officers walked through the Taliban cemetery, where the organization’s white flags fly above gravestones.

The police chief ordered an end to Taliban burials there months ago, but the cemetery was surprisingly well maintained.

As the police wandered through the graveyard, they were well aware of the fragility of the peace in Panjwai. A few miles away, on the periphery of the district, four residents who had cooperated with the government had been killed that afternoon by insurgents. Was it the beginning of another offensive? No one was sure.

One of the youngest police officers clasped his hands and started praying in front of a grave, on behalf of the deceased Taliban militants.

“God forgive them,” he whispered.

Sharifullah Sharaf contributed to this report.