In Kandahar, the security of one of most critical provinces in Afghanistan was immediately cast into question with the death of General Raziq, who held together by force of personality a network that outstripped the capabilities of the central Afghan government anywhere outside Kabul, the capital.

When General Raziq was made police chief of Kandahar in 2011, while in his early 30s, the Taliban were at the city gates. In fact, they would frequently grab government employees from the heart of the city to a kangaroo court on the outskirts. Two of General Raziq’s predecessors as police chief were killed on the job.

General Raziq was ruthless in his pushback, personally leading operations that dealt heavy casualties to the Taliban. Human rights groups accused him of torture and extrajudicial killings, including of tribal rivals. But as he established his grip in recent years and turned to national politics, officials described him as more disciplined and cautious.

General Raziq’s death sent the Taliban into a frenzy of celebration, captured on videos circulating on social media accounts. At the central prison in Kabul, dozens of Taliban inmates danced to an improvised group chant: “O, they killed Raziq! In Kandahar, they killed Raziq!” (Song and dance were forbidden when the Taliban controlled Afghanistan.)

“This Raziq martyred 2,800 people, without a court and justice, and buried them in the sands of Kandahar as their mothers still wait,” a Taliban official, Mawlawi Abdul Ghafoor, told a packed gathering of Taliban in Quetta, Pakistan, where the group’s leaders are based. “The Talib who tore a hole in Raziq’s chest — may God unite us with him in heaven. And may God unite Raziq with his Scott Miller.

“One of our leaders was saying he wished Scott Miller was also gone. I said, ‘Why are we so greedy?’ I wouldn’t have been as happy if 500 Americans were killed as I am that Raziq is killed.”

General Raziq became an overnight national martyr of a battered nation. His picture is on billboards in roundabouts and on windows of bakeries. His grave, just outside the governor’s compound where he was killed, has already become a shrine.