President Donald Trump is receiving mixed reviews for scheduling, then canceling, a secret meeting with Taliban representatives that was to have taken place at Camp David last weekend.

Democrats blasted Trump for treating diplomacy like a “game show,” while Republicans were both aghast at the meeting, and relieved that he had nixed it.

More important, the meeting and cancelation improve America’s leverage, both in Afghanistan and elsewhere.

Trump, like President Barack Obama before him, is looking for a way to bring U.S. forces home. Obama foolishly set a timeline for his troop “surge,” making it clear that political considerations were more important to him than victory. And he traded five senior Taliban leaders for deserter Bowe Bergdahl, in a swap that damaged America’s bargaining position as well as military morale. Since taking office, Trump has been looking for a dignified exit.

It was not clear things were headed in that direction. As Breitbart News national security editor Frances Martel has argued, the emerging details of a deal with the Taliban seemed to repeat the mistakes of Colombia’s deal with the FARC, giving terrorists a political stake in the hope power will reform them.

Trump’s given reason for canceling — a recent attack that killed a U.S., among others — is as good a pretext as any, and could allow a better deal to emerge.

But beyond Afghanistan, Trump has also sent a message to other rivals and enemies: namely, that he is more than willing to negotiate — even bucking his own party — but he will not do so from a position of weakness, or under fire.

That is good policy: in most recent historical examples of peaceful transitions from civil war, all sides agreed to suspend violence as a condition of talks. It is also good strategy: unlike Obama, Trump will not be pushed around.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He earned an A.B. in Social Studies and Environmental Science and Public Policy from Harvard College, and a J.D. from Harvard Law School. He is a winner of the 2018 Robert Novak Journalism Alumni Fellowship. He is also the co-author of How Trump Won: The Inside Story of a Revolution, which is available from Regnery. Follow him on Twitter at @joelpollak.