The two men never pretended to like each other. It was not just their clashing personalities or vastly dissimilar backgrounds. Their differences were fundamental, their values dramatically at odds, and their disagreements public and pointed.
Mr McCain, a United States senator from Arizona for over three decades and former prisoner of war in Vietnam who ran unsuccessfully for US president in 2008, died on Saturday (Aug 25) at the age of 81.
President Trump tweeted on Sunday: "My deepest sympathies and respect go out to the family of Senator John McCain . Our hearts and prayers are with you!"
When Mr Trump announced his candidacy for the Republican presidential nomination in June 2015, suggesting that many Mexican immigrants were criminals and "rapists", Mr McCain denounced him for using language that "fired up the crazies".
Mr Trump s response: McCain was a "dummy" who had barely managed to graduate from the US Naval Academy.
Never one to give in, Mr Trump then attacked the former navy pilot over what might have seemed his least vulnerable point: the military career - including more than five years as a wounded and tortured prisoner of war in Vietnam - for which he received a slew of decorations including the Silver Star, the Legion of Merit and three Bronze Stars.
Mr Trump, who received serial deferments and did not serve in the military, said that Mr 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.
Mr McCain s response starkly illustrated the two men s different characters: The senator sought no apology on his own behalf but said that Mr 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 Mr 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.
Eight years later, here was a man who openly professed his love of money, who had avoided military service because of a foot problem he later said had healed itself, a man who bragged about greasing the wheels for his New York real estate empire by donating to both Democrats and Republicans, a man who, in short, unapologetically flouted the long-established traditions of American politics and the presidency.
Mr McCain announced that he would instead vote for "some good conservative Republican who is qualified to be president". - APP/AFP