The process and product of President Donald Trump’s policy on Afghanistan is deeply flawed.

Most of the focus is now on Trump scuttling a previously secret Camp David meeting with representatives of the Taliban and the Afghan government.

Peace talks, by definition, are between adversaries, if not enemies. It’s not wrong to explore diplomatic solutions to conflicts with leaders of North Korea, Iran and other nations, and talks with the Taliban to try to end a conflict with no clear military solution is appropriate — under the right conditions.

The ad hoc Camp David gambit did not constitute the right conditions.

Symbolically, lending the stature of the presidential retreat to the Taliban — just days before the 9/11 anniversary — was insensitive and nonsensical. And the failed maneuver would have elevated unrepentant adversaries with the prestige of a presidential meeting without commensurate value in return. It’s unfortunate Trump didn’t learn from the three meetings he has had with North Korean leader Kim Jong Un, who has not stopped his nation’s weapons proliferation.

Trump’s stated reason for canceling the Camp David meeting seems disconnected to the ongoing carnage in Afghanistan, too. Citing the death of Army Sgt. 1st Class Elis Angel Barreto Ortiz, Trump tweeted: “What kind of people would kill so many in order to seemingly strengthen their bargaining position?”

The Taliban, that’s who. Sixteen U.S. service personnel have already been killed in Afghanistan this year, and more than 2,400 have lost their lives since the Taliban-sheltered al-Qaida killed nearly 3,000 in the 9/11 attacks. Untold numbers of Afghans have been victims, too.

Every death is tragic. But Ortiz’s was not singular, and the terrorist group didn’t just suddenly ramp up its nihilism in order to negotiate.

The Taliban reportedly indicated that its leaders would only attend the Camp David meeting if a negotiated settlement with the U.S. had been announced. Meanwhile, Trump also invited Afghan President Ashraf Ghani for separate talks, perhaps in hopes of negotiating a grander deal, or at least sparking a more productive process between Ghani’s government and the Taliban. That’s unlikely, given that the Taliban rejects the Afghan government as illegitimate and has threatened to target the country’s Sept. 28 presidential election.

Trump should have insisted that Ghani’s government be party to any deal in the first place, especially since it may soon have to contend with a Taliban emboldened by its newfound diplomatic standing and an accelerating U.S. troop withdrawal.

Trump was right to mourn Ortiz’s senseless death. But he should really, not just rhetorically, honor him and all who have served by insisting on a peace process that more directly involves the people U.S. forces have been fighting for. War-weary Americans understandably want an end to the U.S. involvement in Afghanistan. But the best way to achieve that is to not create a vacuum that could quickly be filled with an all-out Afghan civil war.