In his final wishes as he battled a devastating brain cancer, John McCain made it very clear that he did not want Donald Trump to attend his funeral.

The two men never even pretended to like each other. It was not just a clash of personalities or their vastly different backgrounds. Their differences were fundamental, their values dramatically at odds, and their disagreements public and pointed.

McCain, a United States senator from Arizona for over three decades and former prisoner of war in Vietnam - who ran an unsuccessful campaign for US president in 2008, died on Saturday (Aug 25) at the age of 81.

“My deepest sympathies and respect go out to the family of Senator John McCain. Our hearts and prayers are with you,” President Trump tweeted on Sunday.

When Trump announced his candidacy for the Republican presidential nomination in June 2015, suggesting that many Mexican immigrants were criminals and ‘rapists’, to which, McCain denounced him for using language that ‘fired up the crazies.’ Trump s response to McCain was, “McCain is ‘dummy’ who had barely managed to graduate from the US Naval Academy.

Never one to back away from an argument, Trump then attacked the former navy pilot over what might have seemed his least vulnerable point; McCain’s military career - including more than five years as a wounded and tortured prisoner of war in Vietnam - for which he received multiple decorations including Silver Star, Legion of Merit and three Bronze Stars.

Trump, who received serial deferments and did not serve in the military, said that McCain was ‘a war hero (only) because he was captured,’ adding, “I like people that weren’t captured.” That comment that drew widespread condemnation, including from several veterans groups.

McCain’s response starkly illustrated the two men’s different characters, the senator sought no apology on his own behalf but said that Trump did owe an apology to the families of those who have sacrificed in conflict and of those taken prisoner while serving their country.

The rise of Trump’s populist candidacy in 2016 was widely seen as a disavowal of McCain-style Republicanism and of the more establishment approach he took during his own presidential run in 2008.

One day in November 2016, not long after Trump’s surprise victory over Hillary Clinton, the Arizona senator exploded when journalists in the Capitol continued to pummel him with questions about the incoming president, “Do not ask me about Donald Trump. I do not want to be rude to anyone, but I do not want to be asked about Donald Trump.”

It was not an easy vow to carry out, given Trump’s undeniable talent for dominating political debate even while blowing up long-established norms and tenets of American domestic and foreign policy.

But what most scandalised the ageing senator was the new president’s persistent refusal to acknowledge and confront Russian meddling in the US political process. As time went on, McCain’s resistance grew more direct and his words sharper. As Senate Armed Services Committee chairman he opened his own inquiry into Russian interference.

And when he heard Trump’s accommodating words toward Russian President Vladimir Putin when the two met in Helsinki in July, he could contain himself no longer. “Today s press conference in Helsinki was one of the most disgraceful performances by an American president in memory,” he said in a blistering statement.

“The damage inflicted by President Trump’s naiveté, egotism, false equivalence, and sympathy for autocrats is difficult to calculate,” he said. Even as McCain’s health ebbed, he missed few opportunities to lash out at the president.

He was one of just three Republican senators to vote against - and thus defeat - a Trump-backed effort to repeal former president Barack Obama’s signature healthcare law. That single vote earned lasting disdain from the president.

But McCain did not back down. In an op-ed article in the Washington Post, he called the president ‘impulsive’ and ‘often poorly informed.’ In a prepared speech that seemed directed at the president and his aides, McCain denounced the ‘spurious nationalism’ of people who ‘would rather find scapegoats than solve problems.’

And when an October 2017 interview turned to the subject of service in the Vietnam War - a profoundly marking experience in McCain’s own life - he did not hold back.

“One aspect of the conflict, by the way, that I will never countenance is that we drafted the lowest-income level of America, and the highest-income level found a doctor that would say that they had a bone spur,” he said. The allusion to the medical deferment that saved a young Trump from serving in that war could not have been clearer.

The patent contempt the two men displayed for each other showed no sign of fading, even as McCain continued to weaken. A few weeks ago, Trump could not even bring himself to say McCain’s name during a signing ceremony for a defence funding bill that fellow senators had named in the Arizona lawmaker’s honour.