Sgt. First Class Elis A. Barreto Ortiz navigated the crowded streets of Kabul, Afghanistan, on Thursday morning unaware that the United States was on the verge of a precarious peace deal with the Taliban that might end the longest war in American history — just as he was unaware that a suicide bomber hidden in the chaotic city traffic could upend the deal by aiming a car laden with explosives at the sergeant’s truck.

But as Sergeant Barreto Ortiz, who was part of a driving team for covert special operations officers, neared a checkpoint in the neighborhood where Afghan national security authorities have offices, his unarmored Toyota SUV — meant to blend in with civilian traffic — was hit by a suicide car bomber. The explosion killed the sergeant, a Romanian army corporal and 10 Afghan civilians. The Taliban almost immediately claimed responsibility.

Later that day, President Trump told his national security team he would not host talks with the Taliban immediately after the group had killed an American soldier, saying, “This is off; we can’t do this.”

In a series of tweets on Saturday night, Mr. Trump said he had “called off peace negotiations,” adding on Monday that he alone had made the decision to cancel a meeting at Camp David. American officials have clarified that the deal had been neither rejected nor accepted.