The political disaster that was the non-repeal of Obamacare last month was bad enough. But now its recriminatory aftershocks, fully joined by President Donald Trump himself, augur ill for the future of the Republican agenda this year — and maybe beyond.

The president was understandably frustrated in his first major legislative campaign. He worked the phones late most nights to round up GOP votes to pass the imperfect, long-promised repeal out of the House of Representatives.

He had nearly a score of individual White House meetings and social occasions with House members, mainly the recalcitrant rogues of the so-called Freedom Caucus. Trump even made an unusual presidential trip to Capitol Hill just to lobby.

In each meeting, the Freedom Caucus had a new objection. Trump sought a solution. Then another objection. And another.

In the end, Speaker Paul Ryan, facing certain defeat not at the hands of an impotent Democratic minority but because of GOP teammates, pulled the bill.

Trump will get his Supreme Court nominee confirmed shortly, a major win. But the repeal retreat was a vivid lesson in how little control any GOP leaders maintain in 2017 over the energies and directions of the party rank and file. Trump benefited from that lack of cohesion last year to snatch the nomination, but now it works against him.

The rejected party leader later resorted to Twitter to slam the 30 or so Freedom Caucus members who stood against the bill’s passage, professing allegiance to conservative principles.

Trump tweeted: “The Freedom Caucus will hurt the entire Republican agenda if they don’t get on the team, & fast. We must fight them, & Dems, in 2018!”

That makes for fighting words. And emboldened caucus members responded in kind:

“It didn’t take long for the swamp to drain realDonaldTrump,” said Rep. Justin Amash of Michigan, suggesting Trump had already been co-opted by the D.C. elite he had so ardently campaigned against.

Conservative activist Pamela Geller analyzed it this way at American Thinker: “Politics is a twisted world, in which power and re-election are the currency in which they trade. The bottom line in business is money, and while money talks for politicians also, the bottom line with these corrupt clowns is not always so easy to discern.”

The party dysfunction and disunity come at a bad time. First, they ruin any sense of momentum surrounding a new chief executive and hearten leaderless Democrats.

As the party that finally got what it sought — control of the legislative and executive branches — the GOP already looks ineffective by its own hand. Coming this month are likely intraparty fights over spending priorities. A government shutdown looms April 28 without an agreement.

Tax reform could be handicapped too. Savings from Obamacare changes, now lost, were to have financed much of it.

Trump may produce another sharp political pivot. We’ve seen that before. And the reality is he’d have a tough time mounting primary challenges to Freedom Caucus rebels. Most of them come from conservative districts; many won by larger margins there than Trump.

And although his rally crowds remain large and enthusiastic, the president’s unusually low job approval rating — now in the mid-30s — provides no leverage.

The early April media focus shifts now to foreign affairs briefly with Trump hosting Egypt’s President Abdel-Fattah el-Sissi, then Jordan’s King Abdullah II, both key anti-Islamic State allies, followed by China’s President Xi Jinping, who is no ally.

Situated between Libya and Israel and hard by Syria, Egypt plays a key political, military and cultural role in the Arab world. El-Sissi has told diplomats he’s waiting to see whether warm relations resume with the new American president. That might actually be easier for Trump than with the Freedom Caucus.