Donald Trump deserves enormous credit for his historic victory, in which he increased his support among almost every demographic group in the country. But Democrats made it possible with several catastrophic choices over the past four years. Here are the eight key blunders that paved the way for Trump’s comeback:

1. They ignored warnings from liberal economists that their massive new spending would unleash disastrous inflation.

Democrats should have listened to former Clinton treasury secretary Lawrence H. Summers, who cautioned in 2021 that the American Rescue Plan would “set off inflationary pressures of a kind we have not seen in a generation.” They should have heeded Obama economic adviser Jason Furman, who warned that “pouring roughly half trillion dollars of gasoline on the inflationary fire that is already burning is reckless.” They were right. By the time Joe Biden and Kamala Harris took office, the economy had turned the corner and was growing at 6.5 percent. But they wanted credit for the post-covid recovery. Instead, they got the blame for unleashing the worst inflation in four decades.

2. They created a border disaster.

Democrats knew that illegal immigration propelled Trump into the White House in 2016. So why, on winning back the presidency in 2020, did they immediately unleash the worst peacetime border crisis in U.S. history? The crisis cost taxpayers $150 billion in 2023 alone, according to an analysis by the Federation for American Immigration Reform — forcing inundated communities to cut police, fire and other services to support illegal migrants. Did they think voters would reward them?

3. Their catastrophic withdrawal from Afghanistan convinced Americans they were incompetent.

Most were not thinking of Afghanistan in the voting booth, but the horrific images of Afghans falling from departing U.S. military aircraft, Taliban forces riding abandoned U.S. military vehicles, and 13 Americans killed by a suicide bomber at the Kabul airport’s Abbey Gate indelibly changed opinions of Biden’s presidency. Before Kabul fell in August 2021, his approval rating had never dipped below 50 percent. After, the floor fell out. Harris proudly declared she was the last one in the room before Biden made the fateful decision to pull out — which sent a message of weakness that clearly emboldened Russia to invade Ukraine, and Hamas, an Iranian proxy, to launch the worst massacre of Jews since the Holocaust. Democrats promised to end the chaos of the Trump era, but instead unleashed chaos on the world stage.

4. They broke their promise to unite the country.

Biden pledged in his inaugural address to put his “whole soul” into “bringing America together.” Instead, he compared Republicans to racists and traitors, accusing them of standing with George Wallace, Bull Connor and Jefferson Davis for opposing his partisan election bill, and declaring right before the election that “the only garbage I see floating out there is [Trump’s] supporters” (he later claimed, implausibly, that he had misspoken). Harris went further, calling Trump “a fascist,” a “wannabe dictator” and a “petty tyrant.” This not only reeked of desperation, it violated the very reason voters elected them.

5. They covered up Biden’s cognitive decline.

Democrats misled the American people about Biden’s mental fitness — assuring them, as Harris did, that the president was “vibrant,” “tireless” and “absolutely authoritative in rooms around the globe” — only to have those falsehoods exposed by Biden’s disastrous debate performance.

Americans don’t like being lied to. And if they had been honest sooner, Democrats could have held a competitive primary and picked a more capable and appealing nominee.

6. They didn’t give voters a benign alternative.

Unlike Biden, who at least had the veneer of moderation, Democrats nominated the most radical Democratic ticket in the history of the country. Harris was on record as having supported the Democratic socialist agenda, from the Green New Deal to Medicare-for-all. In her 2019 campaign, she had pledged to ban fracking and the sale of gas-powered cars, decriminalize illegal border crossings and provide taxpayer-funded health care for illegal migrants, including gender transition surgery. Repudiating so much of her 2019 platform came across as both inauthentic and implausible. Polls showed nearly half the country thought Harris was too far left.

7. They offered Americans continuity when they wanted change.

In an election when 95 percent of Americans sought change, nominating the sitting vice president of one of the most unpopular administrations since World War II was a mistake. Only once in the last 188 years has a sitting vice president been elected president, and that was in 1988 when George H.W. Bush was elected because Americans wanted another Reagan term. No one wanted another Biden term.

8. Their campaign of lawfare locked in Trump’s nomination. Indicting Trump caused many Republicans, including some who had been open to a different nominee, to rally around the former president.

And that was exactly what many Democrats wanted. They thought Trump would be easier to beat.

They were wrong.

Any one of these mistakes might have been survivable, but together they created a perfect catastrophic storm that Trump rode back into the White House.

Marc Thiessen writes a column for The Post on foreign and domestic policy.