Team Trump has begun to hint that, if The Donald loses, a big reason will be the “betrayal” by House Speaker Paul Ryan. That gets things exactly backward.

The Trumpers’ venom could have widespread repercussions — further dividing the party, hurting down-ballot candidates and even threatening Ryan’s re-election as speaker if the GOP holds the House.

Which would be a disaster for both Republicans and the entire country.

Trump has long accused Ryan of disloyalty, especially after the speaker said he’d no longer defend the nominee once the “locker room” tape leaked. That’s been echoed by such high-profile allies as Fox News’ Sean Hannity.

Here’s the thing: It was Trump’s job to unite the party behind him — by being a nominee all Republicans could support. He was pulling it off in the weeks before the first debate, but he’s wasted much of his fire since then on irrelevant digressions.

Ryan’s doing what he can to save the GOP majority in the House — not by attacking Trump, but by ignoring him.

The attacks on the speaker are having an impact: Polls show Ryan losing popularity among Republicans nationwide. And The Hill reports the House Freedom Caucus is looking to back a challenger to Ryan after Election Day.

All of which ignores the fact that Ryan only took the job reluctantly: Keeping his members united is brutally hard, thankless work. Now Trump’s even complicating the task of preserving the GOP majority.

It’s past time for The Donald to accept that if he loses this election, it will be his own fault and no one else’s.

Paul Ryan has been an effective speaker, a thoughtful policymaker and the best leader the GOP could have on Capitol Hill.

If Hillary Clinton wins Nov. 8, Republicans will need him at the helm. And if Trump wins, they’ll need him even more.