US President Donald Trump, under political pressure for offering only a half-hearted tribute for the late Senator John McCain, has said he respected his service to the nation and ordered US flags to be flown at half-staff in his honour.

Under fire for what critics said was a lack of respect for the late US senator, Mr Trump issued a formal proclamation about Mr McCain's death and ordered the White House flag back to half-mast.

"Despite our differences on policy and politics, I respect Senator John McCain's service to our country and, in his honour, have signed a proclamation to fly the flag of the United States at half-staff until the day of his interment," Mr Trump said in a statement.

Mr Trump said Chief of Staff John Kelly, Defense Secretary James Mattis, and adviser John Bolton would represent his administration at Mr McCain's services this week

He also said Vice President Mike Pence would speak at a ceremony on Friday at the US Capitol in remembrance of Mr McCain.

It comes as the late Mr McCain warned against "tribal rivalries" that have sown "hatred" around the world, in a final message read posthumously that appeared aimed at Mr Trump.

"We weaken our greatness when we confuse our patriotism with tribal rivalries that have sown resentment and hatred and violence in all the corners of the globe," Mr McCain said in a farewell statement read by his campaign manager Rick Davis.

"We weaken it when we hide behind walls, rather than tear them down, when we doubt the power of our ideals, rather than trust them to be the great force for change they have always been," he added in an apparent reference to the Trump presidency.

Mr Davis confirmed that Mr Trump would not be attending the funeral.

"The president will not be, as far as we know, attending the funeral. That's just a fact," the longtime aide told a press briefing in Arizona.