Sen. John McCain wrote a farewell message to his "fellow Americans" before he died, a reminder of what makes America great that was read to reporters Monday by his longtime political ally and campaign manager Rick Davis.

McCain said in the message, read by an emotional Davis, that the association of "fellow Americans" meant more to him than any other and that Americans "never hide from history," but make it.

Read the full text below.

"I lived and died a proud American," McCain said in his last words, extolling the virtues of "the world's greatest republic."

The Arizona Republican asked that Americans remember that "we have always had so much more in common with each other than in disagreement," and try to presume that all Americans love the country.

McCain died of brain cancer Saturday at 81. Davis is part of the group of family, friends and politicians planning remembrances of the decorated Vietnam War hero, prisoner of war and six-term senator.

While the statement didn't mention President Donald Trump, McCain alluded to former President Barack Obama, saying he still feels the same deep faith in Americans in his heart the evening he "had the privilege to concede defeat" to Obama in the 2008 election.

McCain told citizens "do not despair of our present difficulties" and that it is better to tear walls down than build them.

"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," he said.

Trump and McCain had a long-running feud that went back to the 2016 presidential campaign, when Trump called McCain "incompetent" and "very weak on immigration" and McCain responded that Trump "fired up the crazies" in his home state.

Trump went on to say that McCain wasn't a war hero "because he was captured."

The pair had a cool relationship after Trump won the White House, especially after McCain scuttled a bill that would have fulfilled Trump's campaign promise to repeal and replace the Affordable Care Act.

Davis didn't directly address news reports that Trump was asked not to attend the funeral but did say, "the president will not be, as far as we know, attending."

That was confirmed later in the day by Trump, who said in a statement that he had asked "General John Kelly, Secretary James Mattis, and Ambassador John Bolton to represent my Administration at his services."

In that statement, released by the White House, he said: "Despite our differences on policy and politics, I respect Senator John McCain's service to our country and, in his honor, have signed a proclamation to fly the flag of the United States at half-staff until the day of his interment."

Trump and the White House had been criticized for raising the flag earlier Monday.

Many others, from leaders of both parties to former living presidents, hailed McCain's life of service to his country as exemplary.

But in the wake of his death, some commentators have seized on long-standing criticisms of the senator — some on the left said he was too eager to use American military power abroad and some on the right said he cooperated too much with Democrats.

In his farewell, McCain acknowledged, as he often did, that he wasn't perfect: "I have tried to serve our country honorably. I've made mistakes, but I hope my love for America will be weighed favorably against them."

The full text of McCain's farewell statement:

My fellow Americans, whom I have gratefully served for sixty years, and especially my fellow Arizonans,

Thank you for the privilege of serving you and for the rewarding life that service in uniform and in public office has allowed me to lead. I have tried to serve our country honorably. I have made mistakes, but I hope my love for America will be weighed favorably against them.

I have often observed that I am the luckiest person on earth. I feel that way even now as I prepare for the end of my life. I have loved my life, all of it. I have had experiences, adventures and friendships enough for ten satisfying lives, and I am so thankful. Like most people, I have regrets. But I would not trade a day of my life, in good or bad times, for the best day of anyone else’s.

I owe that satisfaction to the love of my family. No man ever had a more loving wife or children he was prouder of than I am of mine. And I owe it to America. To be connected to America’s causes – liberty, equal justice, respect for the dignity of all people – brings happiness more sublime than life’s fleeting pleasures. Our identities and sense of worth are not circumscribed but enlarged by serving good causes bigger than ourselves.

‘Fellow Americans’ – that association has meant more to me than any other. I lived and died a proud American. We are citizens of the world’s greatest republic, a nation of ideals, not blood and soil. We are blessed and are a blessing to humanity when we uphold and advance those ideals at home and in the world. We have helped liberate more people from tyranny and poverty than ever before in history. We have acquired great wealth and power in the process.

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. 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.

We are three-hundred-and-twenty-five million opinionated, vociferous individuals. We argue and compete and sometimes even vilify each other in our raucous public debates. But we have always had so much more in common with each other than in disagreement. If only we remember that and give each other the benefit of the presumption that we all love our country we will get through these challenging times. We will come through them stronger than before. We always do.

Ten years ago, I had the privilege to concede defeat in the election for president. I want to end my farewell to you with the heartfelt faith in Americans that I felt so powerfully that evening.

I feel it powerfully still.

Do not despair of our present difficulties but believe always in the promise and greatness of America, because nothing is inevitable here. Americans never quit. We never surrender. We never hide from history. We make history.

Farewell, fellow Americans. God bless you, and God bless America.