Late Sen. John McCain urged Americans to unite in his farewell letter despite the increasingly tense political climate.

The Arizona Republican’s longtime aide Rick Davis read the letter on Monday.

“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,” Davis read from McCain’s letter. “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.”

The senator’s reference to walls appears to have been an evident jab at President Donald Trump and his proposed southern border wall. McCain went on to say that his life had proved to be very “rewarding,” and acknowledged that he made several errors throughout his career. McCain also cited the U.S.’s history of helping impoverished civilizations and forming strong relationships with other countries.

“I lived and died a proud American,” the letter continued. “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.”

50 CELEBRITIES WHO DIED IN 2018 – TRIBUTE SLIDESHOW 

The senator’s daughter, The View co-host Meghan McCainshared his farewell statement on Twitter on Monday:

Senate Majority Leader Mitch McConnell also honored McCain in a statement before his fellow lawmakers on Monday:

“I think it’s fair to say the passion that John brought to his work was unsurpassed in this body. In more than 30 years as a senator, he never failed to marshal a razor-sharp wit, a big heart and a fiery spirit,” said McConnell. “When John saw an issue the same way you did, you knew you’d just found your most stalwart ally. You’d thank your lucky stars. Because when you found yourself on the other side of that table, as I think all of us learned, you were in for a different kind of unforgettable experience.”

SLIDESHOW: DONALD TRUMP’S 30 CRAZIEST TWEETS

Another top Republican, Sen. Lindsey Graham of South Carolina, also weighed in on McCain’s legacy. Graham and McCain served together as members of the Senate Armed Services Committee.