It was clear to me weeks ago, even before Marco Rubio threw in the towel, that the GOP was getting ready to cuddle with Ted Cruz.

But I never expected a love quite like this to bloom.

It’s a singularly tortured love, one that grits its teeth, girds its loins and pines for a contested convention.

It’s hate worn down into resignation, disgust repurposed as calculation. Stopping a ludicrous billionaire means submitting to a loathsome senator. And so they submit, one chastened and aghast Republican leader after another, murmuring sweet nothings about Cruz that are really sour somethings about Donald Trump.

Will they still respect themselves in the morning?

I’m not sure we’ve ever witnessed a capitulation this grudging, a cynicism this grotesque, a reversal of regard this fraudulent and flat-out hilarious. While politics is an impure arena in which yesterday’s enemies routinely become tomorrow’s allies, the transmogrification of Cruz goes beyond that, proving that in the right circumstances, with the right motivation, you can see just about anyone in a newly flattering light.

Attila the Hun? True, he was truculent, but what a can-do spirit! Torquemada? A tad rigid, yes, but that’s what righteousness sometimes looks like.

Cruz has gone from the insufferable nemesis of Republican traditionalists to their last, best hope, and the likes of Mitt Romney, Lindsey Graham and Jeb Bush have now given him endorsements — or approximations thereof — that will go down in political history as some of the most constipated hosannas ever rendered.

They hardly mention Cruz’s name. They barely manage to assign him a single virtue.

“Consistent,” Bush called him — in a Facebook post. He apparently couldn’t rouse or debase himself to a proper news conference.

He was following the lead of his younger brother Neil, who had signed up with Cruz a few weeks earlier and explained, “I commit this from my head, not my heart.” There’s a sentence you won’t find on a Valentine’s Day card.

Graham professed his devotion during an interview on “The Daily Show.”

“I’m on the Ted train, absolutely,” he told Trevor Noah, but when Noah pressed him about the charms of that particular mode of transportation, he confessed that he would have preferred another — possibly an Edsel, maybe even a tricycle with a wobbly front wheel. “He was my 15th choice. What can I say?”

Not much that’s laudatory, apparently. Cruz is the love that chokes on its own words.

It’s a surprise-every-second love. On Friday, Cruz made public reference to — and furiously denied — a National Enquirer story that accused him of affairs.

It’s also a love that makes no promises of its endurance. In fact, many of the Republicans in a faux swoon for the far-right loon don’t really want to see him fly all the way to the White House — or, for that matter, to the nomination.

There’s a tangle of mindsets at work and strategies in play. They all involve thwarting Trump, but with different outcomes in the end. Bear with me. This requires a bit of explanation.

Few of the Cruz converts actually think he can amass a majority of delegates and win the nomination before the convention. For that to happen, their endorsements of Cruz would have to scare off John Kasich and turn the contest into a two-man race, and Kasich doesn’t seem to be scaring.

The real goal is to buck up Cruz to a point where he prevents Trump from getting that majority and either passes him in the delegate count or draws close. Abracadabra: a contested convention.

Some of the new Cruz devotees indeed hope that he would be the beneficiary of that and the ultimate victor. They expect Cruz to lose the presidency. But then they also expect Trump to lose it — and to lose it in an uglier, more divisive fashion that drags down Republicans running for the House and Senate, too. This lose-with-Cruz faction figures that a reset of the party after a Cruz defeat would be possible, whereas Trump might not leave them with much of a party to reset.

Others who have crawled into bed with Cruz are also after a contested convention, but would use it to crawl out of that bed and into the arms of some Republican Romeo waiting in the wings. Maybe Paul Ryan, though he’s playing Hamlet: to be drafted or not to be drafted? Maybe Mitt Romney, who seems readier to commit.

Both Ryan and Romney have stepped forward with high-minded soliloquies about the GOP’s values and future, and while that may well be a reflection of conscience, mightn’t it also be a fig leaf over ambition?

And at least a few of those canoodling with Cruz see him as a bridge to Kasich. In this convoluted scenario, endorsing Kasich now serves no purpose: He has too few delegates to compete with, and foil, Trump. But if the convention turns into a free-for-all, then Republicans will be free to realize what polling has repeatedly told them, and what is almost indisputably true: Kasich would be their best bet against Hillary Clinton, if only they could see his sex appeal.

Poor Kasich. He governs the crucial battleground of Ohio, has high approval ratings there, has made a stand for decency in an indecent age, and is out there on the campaign trail wrapping his arms around every last American who will stand still long enough to let him. Even so he’s spurned.

“Does Kasich have a following?” wrote conservative columnist John Podhoretz just days ago. “Yes, he does, of people who still cry when they listen to ‘Eleanor Rigby’ and its invocation of ‘all the lonely people’ and who want a hug because their Aunt Minnie has the shingles.”

So the answer, at least for now, is Cruz? In this bitter season, yes. Sixty percent of Republicans are embarrassed by their party’s presidential race, according to a recent survey by The Times and CBS News, and a Gallup poll released Friday revealed that only 30 percent of Republicans and Republican-leaning independents think that the election process is working properly. Cruz is the pinup for pessimistic times.

Even John McCain, who once dismissed him and Rand Paul as “wacko birds,” said last week that Cruz has what it takes to manage the mess of the Middle East. He hastened to add that he would feel obliged to work with, and support, any Republican who is elected president, and “to put aside my anger.”

That’s the way Republican leaders fall for Cruz — with apologies, asterisks, angst. The terms of endearment are teary ones, because this isn’t the relationship they wanted. It’s the only relationship that’s left. He gets their love because someone must. Isn’t it romantic?

Will they still respect themselves in the morning?