– One pickup truck after another arrived at the government compound in a district capital in Afghanistan on Sunday, pulling around to the back of the governor’s office to unload the dead, out of sight of panicked residents.

Soldiers and police officers, many in tears, heaved bodies of their comrades from the trucks and laid them on sheets on the ground, side by side, until there were 20 of them.

The dead all wore the desert-brown boots of Afghanistan’s finest troops, the Special Forces commandos trained by the United States. Four days earlier, the soldiers had been airlifted in to rescue what is widely considered Afghanistan’s safest rural district, Jaghori, from a determined assault by Taliban insurgents.

Early Sunday, their company of 50 soldiers was almost entirely destroyed on the front line. And suddenly, Jaghori — a haven for an ethnic Hazara Shiite minority that has been persecuted by extremists — appeared at risk of being completely overrun by the Taliban.

A small team of journalists from the New York Times went into Jaghori’s capital, Sang-e-Masha, on Sunday to report on the symbolic importance of what everyone expected to be a fierce stand against the insurgents. Instead, we found bandaged commandos wandering the streets and officials discussing how they could flee an area almost entirely surrounded by the Taliban. By the end of the day, we were on the run, too.

Officials told us that more than 30 of the commandos had been killed and we could see, on the streets and in the hospitals, 10 other wounded commandos. An additional 50 police officers and militiamen were also killed in the previous 24 hours, said the militia’s commander, Nazer Hussein, who arrived from the front line with his wounded to plead for reinforcements.

“This is genocide,” Hussein said. “If they don’t do something soon, the whole district will be in the Taliban’s hands.”

The disaster sparked a protest by Hazaras in Kabul, who railed against what they said was government inaction, but even that took a deadly turn. The demonstration had just ended Monday when a suicide bomber struck, killing three women and three men, one of them a police officer, according to a spokesman for the Interior Ministry.

Jaghori’s 600,000 people are poor and live in an isolated part of the central highlands, an area that has no paved roads or electric lines, with terraced wheat fields and abundant orchards of almond and apple trees. But the district is famous for how peaceful it had been. Most people say they cannot remember the last time there was a murder or serious robbery. And the district’s education record is aspirational for the rest of the country: Schooling is nearly universal among girls, and much higher than the Afghan average for boys. (Nationally, less than a fourth of Afghan girls complete high school.)