Trump was a McCain supporter in the early 2000s and endorsed the Arizona lawmaker during his run for president in 2008.
"I've known him. I like him. I respect him. He's a smart guy and I think he's going to be a great president," Trump told CNN months before the 2008 election.
Campaign finance records show Trump had donated to McCain for years before the 2008 run, including giving the legal maximum to his campaign in May 2008. The same month, members of Trump's family -- wife Melania and children Donald Jr, Ivanka and Eric -- also gave McCain the maximum individual donation allowed under federal campaign finance laws.
Their relationship soured after the early support, however, highlighted by Trump questioning McCain's service.
McCain responded to Trump by asking him to apologize to other prisoners of war who he degraded.
"I think he may owe an apology to the families of those who have sacrificed in conflict and those who have undergone the prison experience in serving their country," McCain said at the time. "I'm not a hero. But those who were my senior ranking officers ... those that inspired us to do things we otherwise wouldn't have been capable of doing -- those are the people that I think he owes an apology to."
McCain also declined to attack Trump's lack of military service, despite being prodded to do so in numerous interviews. Trump had multiple student deferments and one medical deferment.
Trump, despite the early controversy, would go on to win the Republican nomination and with it came McCain's hesitant support.
But the Arizona senator rarely held his fire on Trump when the Republican nominee found himself embroiled in controversy.
When Trump questioned a judge's ability to decide a case because of his Mexican heritage, McCain called the comment "very harmful."
And when Trump attacked Khizr and Ghazala Khan, whose son -- Humayun Khan -- was killed by a suicide bomber in Iraq, after their speech at the Democratic National Convention, McCain warned Trump.
"Arizona is watching," he said. "While our party has bestowed upon him the nomination, it is not accompanied by unfettered license to defame those who are the best among us."
When the tape of Trump casually describing sexual assault during a years old interview with Access Hollywood was published by the Washington Post in October, McCain broke with the Republican nominee.
"I have wanted to support the candidate our party nominated," McCain said, nodding to the fact he was a past nominee. "But Donald Trump's behavior this week, concluding with the disclosure of his demeaning comments about women and his boasts about sexual assaults, make it impossible to continue to offer even conditional support for his candidacy."
Despite Republicans like McCain leaving Trump, the businessman-turned-politician won in November. And so did McCain. The Arizona senator won a sixth term the same day that Trump won the White House, beating Democrat Ann Kirkpatrick in the process.
Continues to criticize Trump
The fact that Republicans accepted Trump did little to alleviate McCain's public critiques.
The Arizona senator has called Trump's dealings with Russian diplomats "deeply disturbing," called his plan to hike the Defense Department budget "totally inadequate" and, more recently, called Trump's tweets calling for a ban on transgender service men and women in the military as "unclear" and unnecessary.
Trump's presidency has further cemented the view, in the eyes of Capitol Hill staffers and political watchers, that McCain has never felt beholden to anyone other than voters in Arizona. But his contempt for Trump, these Capitol Hill staffers said, has further caused McCain to embrace the "maverick" nickname he embraced during the 2008 campaign.
Before the Friday morning vote, McCain's cancer diagnosis had given many of his colleagues a chance to herald him and his meaning to the Senate as an institution.
Senate Minority Leader Chuck Schumer, a New York Democrat, called McCain a "true figure," while Sen. Lindsey Graham, a South Carolina Republican and longtime McCain friend, said, "This disease has never had a more worthy opponent."
Trump's response to McCain's ailment was far more passive, and usually framed around how Republicans needed his vote to pass health care.
After McCain had surgery to remove a blood clot above his eye, Trump wished him well at a White House event by calling him "crusty."
"And I can tell you, we hope John McCain gets better very soon. Because we miss him. He is a crusty voice in Washington," Trump said Monday to a smattering of laughs before pausing and adding, "Plus, we need his vote."
After McCain's diagnosis was made public, Trump's written statement called him a "fighter," but his in-person comments focused more on the practical need for his vote.
As Capitol Hill and White House aides worked to move debate in the Senate, McCain returned to the debate and Trump trumped the decision.
"John McCain was great to show up. Big moment. We got the vote," Trump, speaking with service men and women in Ohio, said about a preliminary vote.
By Friday morning, though, Trump may have thought he needed to be careful what he wished for.
"It was," McCain said as he got into a car to head back to Arizona and begin radiation and chemotherapy, "the right vote."