Image caption McCain: 'I've faced some tough adversaries in the past'

US President Donald Trump has issued a warning to Senator John McCain a day after his fellow Republican delivered a thinly veiled attack in a speech.

"People have to be careful because at some point I fight back," Mr Trump told a Washington radio station on Tuesday.

On Monday, the senator deplored "half-baked, spurious nationalism" in a perceived slight at Mr Trump's so-called America First policy.

A former prisoner of war, Mr McCain was diagnosed with brain cancer in July.

"I'm being very, very nice but at some point I fight back and it won't be pretty," Mr Trump told WMAL on Tuesday in response to a question about the senator's remarks.

Mr McCain was asked by journalists about Mr Trump's remark, and he responded: "I have faced tougher adversaries."

Receiving the Liberty Medal in Philadelphia a day earlier, the six-term senator from Arizona warned against the US surrendering its international leadership.

Mr McCain was applauded as he said: "To fear the world we have organised and led for three-quarters of a century, to abandon the ideals we have advanced around the globe, to refuse the obligations of international leadership and our duty to remain the last best hope of Earth for the sake of some half-baked, spurious nationalism cooked up by people who would rather find scapegoats than solve problems is as unpatriotic as an attachment to any other tired dogma of the past that Americans consigned to the ash heap of history.

"We live in a land made of ideals, not blood and soil," he continued.

"We have done great good in the world. That leadership has had its costs, but we have become incomparably powerful and wealthy as we did."

Liberated from ballot box backlash

Analysis by Anthony Zurcher, BBC News, Washington

John McCain, in the twilight of a career in public service that spans four decades, is telling America how he really feels. He's not happy about what Donald Trump is doing to the Republican Party - and the nation.

This isn't the first time Mr McCain has criticised the president, but these are some of his most direct comments - ones offered after the senator matched words with actions, voting twice against healthcare reform bills the president was pushing.

Just last week another Republican senator, Bob Corker, verbally sparred with the president. Like Mr McCain, Mr Corker - who recently announced his retirement - has probably faced voters for the last time. Both are liberated from any ballot-box backlash from angry Trump supporters.

Their criticisms will no doubt sting the president. Until Republican politicians in power - and those who want to stay there - join the public critiques, however, these swipes, no matter how direct, may have little lasting significance.

Follow @awzurcher

The Liberty Medal is an award recognising leadership in pursuit of freedom whose previous recipients have included Hillary Clinton, Steven Spielberg, Muhammad Ali and Tony Blair.

Mr McCain was presented with the medal by former US Vice-President Joe Biden, whose eldest son died from the same type of cancer Mr McCain now has.

Image caption Watch reactions to his "no" vote against repealing the Obama-era healthcare law

Mr Biden praised the "courage and loyalty" of his former colleague and ex-Navy pilot.

Mr McCain recently torpedoed Trump-backed Republican attempts to repeal and replace Obamacare, the 2010 healthcare law.

According to political website Axios, the US president mocked Mr McCain's thumbs-down gesture as he rejected one of the bills.

Mr McCain has limited mobility of his arms as a result of his injuries from being shot down and tortured in a North Vietnamese prison.

During his presidential campaign, Mr Trump was criticised when he said Mr McCain was not a war hero, adding: "I like people who weren't captured."