In the space of 48 hours, President Trump has got some of his conservative supporters pretty riled up.

His tentative decision to punt for now on funding for the border wall — the Senate passed a kick-the-can stopgap measure on Wednesday — triggered a backlash on the right that threatened to blow up the deal yesterday.

“It’s what the drive-by media calls compromise,” Rush Limbaugh declared. “Trump gets nothing and the Democrats get everything, including control of the House in a few short weeks.”

Ann Coulter, a fierce supporter of a tougher approach to immigration, told The Daily Caller that without the wall Trump’s tenure was a “joke presidency who scammed the American people.” She said she wouldn’t be voting for Trump again because the only reason was for Jared and Ivanka to make more money.

In breaking Twitter news, @realDonaldTrump promptly unfollowed her.

Then the president stunned many of his own aides, congressional supporters and overseas allies by announcing that the U.S. is pulling its troops out of Syria.

On his favorite show, “Fox & Friends,” co-host Brian Kilmeade called the decision “stunning and irresponsible … Nobody thinks that ISIS is defeated. Nobody who understands who was born after 2000 who sees what’s happened after 9/11, understands.”

On the Hill, Lindsey Graham, usually Trump’s closest ally, denounced the decision, calling it a “stain” on America’s honor, and saying Republicans would be going “nuts” if Barack Obama had done this.

Some were going nuts anyway.

And in a coda to the day, the president announced that Jim Mattis, who opposed the Syria pullout, is retiring. While several outlets say the Pentagon chief quit in protest, my own reporting is that Trump forced him out.

Both episodes marked a rare revolt by Trump’s base, underscoring how the president is sometimes squeezed between his conservative campaign promises and the realities of governing. We saw similar tensions in the failed attempts to repeal ObamaCare.

But it also underscores the zig-zag nature of Trump’s decision-making. He is the one who threatened a government shutdown in that televised session with Chuck Schumer and Nancy Pelosi, only to quietly agree to a stopgap funding measure after Democrats dug in on the wall funding.

After an uproar by Mark Meadows and the House Freedom Caucus group, Trump hastily called a meeting with House Republicans, tweeting: “When I begrudgingly signed the Omnibus Bill, I was promised the Wall and Border Security by leadership. Would be done by end of year (NOW). It didn’t happen! We foolishly fight for Border Security for other countries – but not for our beloved U.S.A. Not good!”

The problem is that Trump has little leverage on this one because even a shutdown at midnight tonight would stretch into the Democrats taking over the House in a couple of weeks. Still, Congress is famous for declaring victory with papered-over compromises, such as one that might allow Trump to draw wall funding from the military construction budget.

On Syria, the president overruled Mattis (prompting stories about the Pentagon chief’s declining influence), blindsided some White House aides and stunned the western alliance. Vladimir Putin, on the other hand, applauded the move.

But it was, as Trump says, no surprise. He had long argued against endless military entanglements in the Middle East. As he tweeted:

“I’ve been campaigning on it for years, and six months ago, when I very publicly wanted to do it, I agreed to stay longer. Russia, Iran, Syria & others are the local enemy of ISIS. We were doing there work. Time to come home & rebuild…Do we want to be there forever?”

Where the president got major pushback, especially from conservative foreign policy types, is in declaring ISIS to be defeated. While the caliphate no longer controls large swaths of land, experts say it remains a force for terror. Another point of criticism, from Graham and others, is that this amounts to an abandonment of the Kurds, our allies, who were not given a heads-up.

David Sanger, in an even-handed analysis in The New York Times, said “even Mr. Trump’s biggest critics, the Democrats, will have a hard time going after him on this decision.

“Mr. Trump’s view that American forces cannot alter the strategic balance in the Middle East, and should not be there, was fundamentally shared by his immediate predecessor, Barack Obama. It was Mr. Obama who, at almost the exact same moment in his presidency, announced the removal of America’s last troops in Iraq — fulfilling a campaign promise.”

The right spent years ripping Obama for pulling the remaining U.S. troops out of Iraq, which didn’t want us there. And Obama had run against George W. Bush’s war.

It’s now an established fact that Trump delights in doing what the elites say is imprudent, and surprising even his own staff with abrupt decisions. But I suspect that many Trump supporters, whose kids may be more likely to fight these wars, will shed no tears over the Syrian pullout.

Still, this is the first time in his presidency that Trump is facing serious blowback from the conservative media on two highly significant issues. Maybe the airing of these differences is healthy for both sides.