WASHINGTON — At Tuesday night’s presidential debate, Democrats flipped the script on national security.

For several decades — since the early Cold War, really — Republicans have usually been able to convince the country that they were the ones to be trusted to keep Americans safe. But, as with so much else, President Trump has squandered that durable advantage.

In Ohio on Tuesday, Democrats sounded very much like Republicans of yore in denouncing Trump for jeopardizing national security.

“When I was deployed, I knew one of the things keeping me safe was the flag on my shoulder represented a country that kept its word,” said South Bend, Indiana, Mayor Pete Buttigieg, a veteran. “You take away the honor of our soldiers, you might as well go after their body armor next. This president has betrayed American values.”

Former vice president Joe Biden shouted: “This is shameful! Shameful what this man has done!”

Sen. Kamala Harris (Calif.) said Trump “is basically giving 10,000 ISIS fighters a get-out-of-jail free card.”

Sen. Cory Booker (N.J.) declared that “Russia and Putin understand strength, and this president time and time again is showing moral weakness.”

Even. Sen. Bernie Sanders (I-Vt.), no hawk, said that “when you begin to betray people” as Trump had done to Kurdish allies, “tell me what country in the world will trust the word of the president?”

A dozen years ago, President George W. Bush memorably attacked Democrats who wanted to pull out of Iraq: “The party of FDR, the party of Harry Truman, has become the party of cut and run.”

Now, a Republican president has recklessly pulled U.S. troops out of northern Syria, to calamitous effect, and it can truly be said: The party of Ronald Reagan has become the party of cut and run.

Trump’s Syria debacle has, above all, been a tragedy — for our faithful Kurdish allies, for NATO, for the pride of the U.S. military, for national security and for American leadership. But, combined with Trump placing his political self-dealing above U.S. security concerns in Ukraine, the blunder has left an enormous opening for Democrats to establish themselves as the champions of national security.

Polling shows that Trump, and Republicans, have lost some of their traditional advantage on matters of security. A Gallup poll released a couple of weeks ago showed the GOP with a six-percentage-point advantage on protecting the country from terrorism and military threats, compared with a 23-point advantage in 2014, before Trump took over the party.

Last week, an NPR/PBS NewsHour/Marist poll found that a plurality believe Trump has worsened the nation’s security. And the poll was conducted mostly before Trump gave a green light to Turkey’s invasion of northern Syria — exposing a loyal ally to a massacre, dividing NATO, expanding Russian and Iranian influence, reviving the Islamic State’s prospects, strengthening Syria’s criminal regime and forcing a humiliating retreat by U.S. forces. It had all the dignity of the evacuation of Saigon.

Even those who favored a pullout were stunned by Trump’s clumsiness. But then, this is a man who skipped Vietnam because of bone spurs, raided the Pentagon’s funds for his pet project, and sided with the Kremlin over his own advisers.

And what did Trump do Monday as the outcry built over his Syrian blunder? He tweeted out a plea to “Vote for good guy @seanspicer tonight on Dancing With The Stars.” What patriotic sentiments from a man who, after his Kiev Hustle ended badly and his Turkish Tango forced U.S. troops into a Kurdish Quickstep, is Dancing with the Strongmen, performing the Assad Samba, the Khamenei Can Can and the Putin Polka.

Democrats couldn’t agree on much at Tuesday night’s debate, which because of its format (a ludicrous 12 candidates onstage) was disjointed and desultory. If it established anything, it’s that the titular front-runner, Biden, is a spent force: He seemed halting and a beat behind (“secondly, I mean thirdly …”). Though the polls don’t yet reflect it, the candidates treated Sen. Elizabeth Warren (Mass.) as the front-runner, directing most of their challenges at her.

But for 25 minutes during the second of three tedious hours, Democrats asserted themselves as the defenders of the American military and American security. Though a couple of them (Rep. Tulsi Gabbard and businessman Tom Steyer) went their own ways, the others claimed the moral high ground once ceded to Republicans.

“Soldiers in the field,” the veteran Buttigieg said, “are reporting that for the first time they feel ashamed — ashamed of what their country has done. We saw the spectacle, the horrifying sight of a woman with a lifeless body of her child in her arms asking what the hell happened to American leadership.”

What happened? Trump happened.

(c) 2019, Washington Post Writers Group