(CNN) If Donald Trump wins in November, his most powerful Republican ally in Washington will be House Speaker Paul Ryan -- at least, that's the plan.

But the program has veered off course again and again, as the Republican nominee and the party's top elected official struggle to maintain a fragile détente amid recurring public squabbles.

On Thursday, less than 48 hours after Trump invited new trouble by revealing he would not endorse Ryan -- or fellow GOP stalwart Arizona Sen. John McCain -- in their coming primary contests, Ryan refused to rule out withdrawing his formal support for Trump.

"None of these things are ever blank checks," the speaker told Wisconsin radio host Jerry Bader.

A few days earlier, Trump in withholding his endorsement for Ryan had called back on the darker days of pair's pained courtship.

"I like Paul, but these are horrible times for our country," Trump told The Washington Post . "We need very strong leadership. We need very, very strong leadership. And I'm just not quite there yet. I'm not quite there yet."

Sound familiar? It should. Back in May, Ryan when asked by CNN's Jake Tapper if he was prepared to formally back Trump, said: "I'm not there right now."

Now, a little more than three months from Election Day, the two heaviest hitters in the Republican Party are at another crossroads.

Here's a look back at their long, strange trip.

Ryan and Scott Walker

Months before Trump descended his gilded escalator into the primary muck, Ryan was talking up his fellow Wisconsinite, Gov. Scott Walker, as an early favorite to win the 2016 nomination.

"Scott's a good friend of mine," Ryan said . "I think he's got a really good chance and I look forward to seeing how it goes for him."

It didn't go far. Like so many other would-be Republican contenders, Walker's campaign was quickly derailed by the Trump train.

Walker left the race in September 2015 with this message : "I encourage other Republican presidential candidates to consider doing the same so that the voters can focus on a limited number of candidates who can offer a positive, conservative alternative to the current front-runner" -- a reference to Trump.

The Muslim ban and David Duke

On December 7, just hours after a poll was released showing Ted Cruz leap-frog Trump in Iowa, the businessman put out a surprise statement "calling for a total and complete shutdown of Muslims entering the United States until our country's representatives can figure out what is going on."

Ryan condemned the proposal less than 24 hours later during a news conference on Capitol Hill.

"This is not conservatism," he said. "Some of our best and biggest allies in this struggle and fight against radical Islam terror are Muslims."

The criticism did little to hurt Trump with voters.

And in late February, days before Super Tuesday, he again raised eyebrows by refusing to disavow former KKK leader David Duke during a Sunday interview with Tapper.

That Tuesday -- primary day -- Ryan brushed back Trump again, saying : "If a person wants to be the nominee of the Republican Party, there can be no evasion and no games. They must reject any group or cause that is built on bigotry."

"I hope," he added, "this is the last time I need to speak out on this race."

Ryan's speech

Three weeks later, on the day after Trump scored a major winner-take-all victory in Arizona, Ryan delivered what his office called a speech "on the state of American politics."

Ryan's remarks were mostly read as a thinly veiled rebuke of Trump

"Looking around at what's taking place in politics today, it is easy to get disheartened," he said . "How many of you find yourself just shaking your head at what you see from both sides?"

The Wisconsin primary was less than two weeks away.

Trump goes to Wisconsin

The front-runner landed in the Badger State and immediately proceeded to rip Walker, still popular there despite his weak turn on the national stage -- and a Ryan ally.

"Your governor came out, he was expected to win and we sent him packing like a little boy," Trump said during an interview with radio host Michael Koolidge , after Walker backed his rival, Ted Cruz.

Trump kept up the attacks on Walker during a campaign stop in Janesville, Ryan's hometown -- a decision one Republican strategist in the state told CNN was like "(poking) Ryan in the eye."

JUST WATCHED Speaker Ryan on Trump, GOP unity: "we're not there yet" Replay More Videos ... MUST WATCH Speaker Ryan on Trump, GOP unity: "we're not there yet" 07:02

'I'm not there right now'

So it came as little surprise when, one month after the primary (which Cruz won), Ryan now famously declared he was not prepared to endorse Trump.

"I'm not there right now and I hope to though and I want to," he told Tapper . "But I think what is required is that we unify this party. I think the bulk of the burden on unifying the party will have to come from the presumptive nominee."

Trump responded to the challenge later in the day by putting out a press release saying: "I am not ready to support Speaker Ryan's agenda. Perhaps in the future we can work together and come to an agreement about what is best for the American people. They have been treated so badly for so long that it is about time for politicians to put them first!"

That was Thursday. On Friday, Trump continued, then on Twitter: "So many great endorsements yesterday, except for Paul Ryan! We must put America first and MAKE AMERICA GREAT AGAIN!"

So many great endorsements yesterday, except for Paul Ryan! We must put America first and MAKE AMERICA GREAT AGAIN! — Donald J. Trump (@realDonaldTrump) May 6, 2016

Less than two hours later, he tweeted: "Paul Ryan said that I inherited something very special, the Republican Party. Wrong, I didn't inherit it, I won it with millions of voters!"

So many great endorsements yesterday, except for Paul Ryan! We must put America first and MAKE AMERICA GREAT AGAIN! — Donald J. Trump (@realDonaldTrump) May 6, 2016

At around the same time, Trump spokeswoman Katrina Pierson questioned during an interview on CNN's "New Day" whether Ryan should remain as speaker if he could not come around to the future nominee.

"No, because this is about the party," she said, ripping into the GOP establishment. "The issue here isn't about Donald Trump -- if you can't hold yourself to the standard you hold everyone else to, the problem is with you."

JUST WATCHED Will Trump and Ryan see eye-to-eye? Replay More Videos ... MUST WATCH Will Trump and Ryan see eye-to-eye? 06:11

They meet!

With Trump now the presumptive nominee and Ryan still withholding his support, a summit was arranged as efforts to unify the GOP ahead of the coming general election campaign became increasingly desperate.

The sit-down yielded a joint statement promising "additional discussions" and an assurance that both sides were "totally committed to working together" in their shared desire to defeat Hillary Clinton.

"Great day in D.C. with @SpeakerRyan and Republican leadership," Trump tweeted on his way out of town. "Things working out really well!"

Great day in D.C. with @SpeakerRyan and Republican leadership. Things working out really well! #Trump2016 pic.twitter.com/hfHY9MdAc7 — Donald J. Trump (@realDonaldTrump) May 12, 2016

JUST WATCHED Speaker Ryan endorses Trump Replay More Videos ... MUST WATCH Speaker Ryan endorses Trump 00:51

Ryan endorses Trump

Three weeks later, on June 2, Ryan finally delivered a measured endorsement of Trump.

Writing in Wisconsin's Janesville Gazette , the speaker said he believed that the presumptive nominee would buy-in to the House GOP agenda.

"I feel confident he would help us turn the ideas in this agenda into laws to help improve people's lives," Ryan wrote. "That's why I'll be voting for him this fall."

Trump, of course, was delighted.

"So great to have the endorsement and support of Paul Ryan," he tweeted. "We will both be working very hard to Make America Great Again!"

So great to have the endorsement and support of Paul Ryan. We will both be working very hard to Make America Great Again! — Donald J. Trump (@realDonaldTrump) June 2, 2016

Ryan denounces Trump (again, then again)

Any notion that Ryan's endorsement would tamp down Trump's rhetoric proved to be terribly mistaken. In the subsequent days, Trump launched a series of racially charged attacks on US District Court Judge Gonzalo Curiel, saying he could not fairly oversee a lawsuit related to Trump University because of his Mexican-American heritage.

Ryan called it "the textbook definition of a racist comment" and "absolutely unacceptable."

On June 14, less than two weeks after announcing his endorsement, Ryan was confronted with Trump's renewed push, following the massacre at a gay nightclub in Orlando that weekend, for a halt on Muslim immigration into the US.

"I do not think a Muslim ban is in our country's interest," Ryan said . "It's not reflective of our principles not just as a party but as a country."

It's a theme he returned to this past weekend, as Trump feuded with the family of a Muslim-American soldier killed by a suicide bomber in Baghdad in 2004.

"(Capt. Khan's) sacrifice -- and that of Khizr and Ghazala Khan -- should always be honored. Period," Ryan said in a statement.

A religious test for entering our country is not reflective of America's fundamental values. I reject it. pic.twitter.com/DdsYj2XoLS — Paul Ryan (@SpeakerRyan) July 31, 2016

Trump's revenge

Trump took heavier hits than delivered by Ryan, but on Tuesday -- a day after praising the speaker's primary opponent in a tweet -- the Republican Party's presidential nominee dashed any suggestion of GOP unity by refusing to offer his support to Ryan or McCain in their primary races.

And just in case the message was not clear, Trump even called back on Ryan's own words, saying that when it came to an endorsement: "I'm not quite there yet."

Ryan openly considers dropping Trump

Two days later, Ryan was asked by Wisconsin radio host Jerry Bader if there was any circumstance or development that could lead him to revoke his endorsement.

"None of these things are ever blank checks, that goes with any situation, in any kind of any race," Ryan replied, before offering a blunt assessment of Trump's troubled week.

"He's had a pretty strange run since the convention," the speaker said. "You would think we'd be focusing on Hillary Clinton and all of her deficiencies. She is such a weak candidate that one would think we'd be on offense against Hillary Clinton and it is distressing that that's not what we're talking about these days."