KABUL, AFGHANISTAN (NYTIMES) - He was a young Afghan police officer working alongside American forces in one of the hot spots of the war, with Taleban ambushes all around. Then he turned his weapon on two US Marines, killing them both.
Now, he is out of prison.
His attack, in Helmand province in 2011, was a serious eruption in a phenomenon that within a year would redefine the American war in Afghanistan: insider killings, often by members of the Afghan security forces who, like the police officer, were not at the time part of the Taleban.
But just this month, that officer, Mohammad Dawood, 31, reached the top of the Taleban's list of prisoners they wanted released as they negotiated the opening of peace talks with the Afghan government.
And along with just five other men detained after killing Westerners, his fate became a sticking point that nearly derailed the whole process, officials say.
While the Taleban made the men's release an ultimatum before they would go to the table, officials for the United States, France and Australia were quietly urging the Afghan government not to let them go - even as they told the Afghan government to free thousands of other Taleban prisoners with Afghan blood on their hands in order to open the way for the talks.
Only a last-minute deal to remand the six to a kind of house arrest in Qatar allowed the opening of peace talks on Sept 12.
Dawood, whose name had not been publicly released but whose identity was confirmed by American and Afghan officials, now stands as a symbol of the difficulty - and tough choices - involved in trying to make peace in the middle of a bitter war.
Dawood's killings of Lt Col Benjamin Palmer and Sgt Kevin Balduf in 2011 represent only a fraction of more than 40 years of violence.
But the Taleban's willingness to go to the brink for him in negotiations, despite his acting only on his own behalf, according to his family and close friends, was a stark demonstration of how even isolated disputes can threaten the peace process.
"We are not happy about the release of some prisoners, and we know our allies Australia and France are not happy about the release of some," said Mr Zalmay Khalilzad, the US special envoy for Afghan peace.
In all, the Afghan government freed 5,000 prisoners demanded by the Taleban.
"But we understand that this difficult step was in the service of something even more important, which is to get the Afghan war to come to an end, and it was a necessary step."
The Taleban have consistently made prisoner releases a priority - most notably in the 2014 exchange of an American soldier held by the Taleban for five years, Sgt Bowe Bergdahl, for five senior Taleban figures who were being held at the Guantánamo Bay prison camp.
That deal brought heavy criticism for the Obama administration, and during his campaign for the presidency in 2016, Mr Donald Trump repeatedly called Sgt Bergdahl a traitor who should be executed.
Both Mr Khalilzad as well as Mr Mutlaq al-Qahtani, the Qatari special envoy for the process, refused to discuss details of the arrangement regarding the six prisoners, including where in Qatar the men are being held and under what circumstances.
Mr Amrullah Saleh, Afghanistan's Vice-President, in a recent interview said the men would not be allowed to leave Qatar - all the pages on their passports are crossed out except for the one with the Qatari visa.
Stopping deadly insider attacks like the one by Dawood was once an urgent imperative for the Obama administration.
By the end of President Barack Obama's first term, cultural tensions and increasing pressure from the Taleban had spilled over into violence as Afghan troops turned their guns on their Western allies, threatening to derail the war effort.
By the height of the war, Americans were building outposts within outposts to defend themselves from the very people they were supposed to be training and fighting alongside.
Insider attacks, sometimes called green-on-blue violence, became a grim feature of the conflict.
The deaths of Lt Col Palmer, 43, and Sgt Balduf, 27, came during a flurry of such killings that peaked in 2012, accounting for 15 per cent of coalition troops who were killed or wounded in Afghanistan that year.
Of the four US troops killed in combat in 2020, two were killed in an insider attack in February, marking the last US troops to die from hostile fire before the peace agreement between the United States and the Taleban.
But as was the case for many such attacks, Dawood was not a part of an insurgent group when he killed the two Marines, according to those close to him and to an Afghan official familiar with his case.
Born in Naw Bahar, a small, staunchly anti-Taleban village in Baghlan province, Dawood was one of five brothers and the son of Mr Mohammad Zahir, a poor wheat farmer.
He studied at a madrassa in Kunduz and Baghlan, before studying in Pakistan and Iran, where like many Afghans he worked for a brief time.
Mr Safdar Mohseni, head of the Baghlan provincial council, said Dawood had most likely turned to the Taleban in prison, looking for support.
"He was a good person to me in every way - psychologically, scientifically, religiously - and was a patriot," said Mr Saqi Mohammad Numani, a religious scholar who taught Dawood for several years.
"Like Dawood, I have thousands of students who are not in favour of violence and terror, and Dawood was not in favour of violence."
After returning from Iran, Dawood was engaged to be married, but because he was low on money, he joined the Afghan police.
He trained in Kabul for six months in 2010 and graduated as a sergeant, according to a senior police official who served alongside him in southern Afghanistan.
Not long after Dawood left police training in 2011, he was assigned to the Afghan National Civil Order Police's 5th Brigade, a new unit the US military was training in Afghanistan's volatile Helmand province.
As the Taleban began regaining ground, US and Nato forces started a concerted effort to professionalise the police force to hold what districts the Afghan government still controlled.
On May 12, 2011, Dawood walked from the Afghan portion of his base in Lashkar Gah, the provincial capital of Helmand, and entered the US side, where his Marine advisers lived, slept and ate.
A small group of Marines were outside eating dinner when Dawood lifted his assault rifle and began firing, killing Lt Col Palmer and Sgt Balduf.
Marines fired back, wounding Dawood.
Cultural misunderstandings and disgust with Westerners were traced to many insider killings.
When the attacks began in earnest in 2008, they took a deep toll on the US-Afghan relationship, sowing doubt and distrust that was only exacerbated by the stress of training and combat.
In a country rife with anti-Semitism, Dawood appeared to turn to that in an attempt to justify his actions.
He told investigators he killed the Americans because he thought they were Jews and he did not want to live among them.
He said no one had provoked him, though the senior Afghan official said that Dawood's fundamentalist education in Iran and Pakistan was probably a catalyst for this contempt.