John McCain assailed Donald Trump for inviting Russia to rejoin the G-7, saying he was rewarding a country that had been “assaulting democratic institutions all over the world”.

“The President has inexplicably shown our adversaries the deference and esteem that should be reserved for our closest allies,” the Arizona Republican said in a statement. “Those nations that share our values and have sacrificed alongside us for decades are being treated with contempt. This is the antithesis of so-called ‘principled realism’ and a sure path to diminishing America’s leadership in the world.”

A cascade of elected officials sharply criticised Mr Trump for saying “Russia should be in the meeting” as world leaders from the Group of 7 nations gathered for a summit in Canada. The country has been excluded since its 2014 seizure of Crimea.

“They should let Russia come back in, because we should have Russia at the negotiating table,” Mr Trump said.

Mr McCain has been a vocal critic of Mr Trump’s foreign policy, rebuking the president for empowering authoritarian leaders like Russia president Vladimir Putin and for retreating from America’s role as an ethical standard-bearer.

They have traded barbs in speeches and on Twitter, bolstering Mr McCain’s standing as one of the few Republican elected officials who regularly challenges the president. He has also condemned Mr Trump's support for torture and handed the president a key defeat in casting the decisive vote blocking a healthcare repeal bill.

McCain's last stand Show all 2 1 /2 McCain's last stand McCain's last stand McCain's speech was that of a warrior politician sensing he was perhaps making his last stand Getty McCain's last stand Sarah Palin listens to the Republican presidential candidate John McCain during his speech in Hershey EPA

After more than three decades of public service, Mr McCain revealed earlier this year that he had been diagnosed with an aggressive form of brain cancer. A White House aide recently lost her job after a leak of her comment that Mr McCain could be disregarded because he was “dying anyway”.

Mr Trump has long expressed admiration for Mr Putin, even as American intelligence agencies concluded the Russian leader directed a sweeping election disruption campaign that came to favour Mr Trump’s presidential bid.

John McCain launches coded attack on Trump's 'crackpot conspiracy theories'

Last year Mr Trump said he believed Mr Putin’s assurances that Russia did not meddle in the election and that his counterpart was “very insulted by it”. The White House has since said Mr Trump believes his intelligence agencies’ assessment, and the administration earlier this year imposed sanctions on government-linked Russians in part to penalise the country “attempting to subvert Western democracies”.