McCain, 81, died Saturday at his ranch in Arizona after a yearlong battle with brain cancer.
A black hearse, accompanied by a police motorcade, could be seen driving away from the ranch near Sedona where McCain spent his final weeks. For 50 miles along Interstate 17 southbound, on every overpass and at every exit ramp, people watched the procession. Hundreds, including many waving American flags, parked their cars and got out to watch.
Trump's brief Twitter statement said "hearts and prayers" are with the McCain family.
Trump and McCain were at odds until the end. The president, who as a candidate in 2016 mocked McCain's capture in Vietnam, had jabbed at the ailing senator for voting against Republican efforts to roll back President Barack Obama's health care law.
Earlier this summer, McCain issued a blistering statement criticizing Trump's meeting with Russian President Vladimir Putin.
Former presidents, including those who blocked McCain's own White House ambitions, offered emotional tributes.
Obama, who triumphed over McCain in 2008, said that despite their differences, McCain and he shared a "fidelity to something higher -- the ideals for which generations of Americans and immigrants alike have fought, marched, and sacrificed."
Obama said they "saw our political battles, even, as a privilege, something noble, an opportunity to serve as stewards of those high ideals at home, and to advance them around the world."
Former President George W. Bush, who defeated McCain for the 2000 Republican presidential nomination, called McCain a "man of deep conviction and a patriot of the highest order" and a "friend whom I'll deeply miss."
Bush was among those expected to speak at McCain's funeral. McCain is expected to be remembered at ceremonies in Arizona and Washington before being buried, likely this coming week, at the U.S. Naval Academy Cemetery on a peninsula overlooking the Severn River in Annapolis, Maryland.
Tributes poured in from around the globe.
French President Emmanuel Macron tweeted in English that McCain "was a true American hero. He devoted his entire life to his country." Israel's prime minister, Benjamin Netanyahu, said McCain's support for the Jewish state "never wavered. It sprang from his belief in democracy and freedom." And Germany's chancellor, Angela Merkel, called McCain "a tireless fighter for a strong trans-Atlantic alliance. His significance went well beyond his own country."
McCain was the son and grandson of admirals and followed them to the U.S. Naval Academy. A pilot, he was shot down over Vietnam and held as a prisoner of war for more than five years. He went on to win a seat in the House and in 1986, the Senate, where he served for the rest of his life.
Senate Majority Leader Mitch McConnell, R-Ky., called McCain a "fascinating personality."
"He would occasionally be in a bad place with various members, including myself, and when this would blow over it was like nothing ever happened," McConnell said Saturday after a GOP state dinner in Lexington, Kentucky. "He also had a wicked sense of humor and it made every tense moment come out better."
Former Vice President Joe Biden, who developed a friendship with McCain while they served together in the Senate, said the Arizona lawmaker will "cast a long shadow."
"The spirit that drove him was never extinguished: we are here to commit ourselves to something bigger than ourselves," Biden said
The Senate's top Democrat, New York's Chuck Schumer, said he wants to rename the Senate building that housed McCain's suite of offices after McCain.
"As you go through life, you meet few truly great people. John McCain was one of them," Schumer said. "Maybe most of all, he was a truth teller - never afraid to speak truth to power in an era where that has become all too rare."
See a complete list of reactions from family, officials and others below.
My heart is broken. I am so lucky to have lived the adventure of loving this incredible man for 38 years. He passed the way he lived, on his own terms, surrounded by the people he loved, in the the place he loved best.
JUST IN: Bill and Hillary Clinton: "Senator John McCain believed that every citizen has a responsibility to make something of the freedoms given by our Constitution...He lived by his creed every day." https://t.co/K1b74dVhVcpic.twitter.com/iV9zZwYUGG
Words cannot express the sorrow I feel at John McCain’s passing. The world has lost a hero and a statesman. Cindy and the McCain family have lost a loving husband and father. I have lost a wonderful friend.
Arizona will never be the same. @SenJohnMcCain may you rest in peace, and may comfort come to your family - and to all of us who will grieve your loss to our great country. A statesmen, a patriot, our Arizona hero.
Karen and I send our deepest condolences to Cindy and the entire McCain family on the passing of Senator John McCain. We honor his lifetime of service to this nation in our military and in public life. His family and friends will be in our prayers. God bless John McCain.
Senator John McCain passed today, all i can think about..he never stopped trying to do his best. What an honor it’s been to know him. My condolences to the family he loved and adored and to his daughter & my friend @MeghanMcCain...from all my family, much love
"Senator McCain was not only a great man and patriot, but a great D-backs fan and I am proud to consider him a dear friend. We always knew we could count on him to root us on -- from the ballpark, from his home and from all the way across the country. On behalf of my entire family, our thoughts and prayers are with Cindy and his family and we are very grateful for all that he did on behalf of his country" - D-backs legend Luis Gonzalez
"John McCain has always been a member of the D-backs' family and was one of this team's biggest fans since day one" - Arizona Diamondbacks President & CEO Derrick Hall
I pray that God comforts Cindy and the entire McCain family. My heart is with them, and Arizona grieves with them.
I have only encountered a few true heroes in my life, but Senator McCain was one of them. That he became a friend is one of the greatest privileges of my life. Thank you, John, for a lifetime of hard work for the people of Arizona and of this great nation. https://t.co/9Wnun7Ih0d
Today is a sad day for Arizona. @SenJohnMcCain epitomized courage, service and leadership. He will be missed. We send our condolences and prayers to the McCain family and all who are feeling the loss. Rest in peace Sir. pic.twitter.com/RE5OEvEElC
John McCain was an American hero, a man of decency and honor and a friend of mine. He will be missed not just in the U.S. Senate but by all Americans who respect integrity and independence. Jane and I send our deepest condolences to his family.
.@SenJohnMcCain was a leader & public servant of deep patriotism, outstanding bravery & undaunted spirit. Throughout his career, we all saw his integrity, humility, courage & grace. May it be a comfort to his family to know that so many around the world mourn with them.
"Our thoughts and prayers are with Cindy McCain and the entire family. John McCain was a great man and a great Arizonan who committed his life in the most remarkable and respectable ways to the service of others and his country. From the military to the Senate he was a brave and honorable person. May he rest in peace" - David Garcia
Senator McCain sacrificed for our freedoms, inspiring us all to a higher standard. The “Maverick” has left us, yet his strength lives on in us.
The MCSO family sends our deepest condolences and appreciation to the McCain family.
Godspeed Senator McCain,
Sheriff Paul Penzone pic.twitter.com/MdzIdBzTmE
The men & women of the @ChandlerPolice wish to extend our condolences to the family & friends of Senator McCain, who passed away this afternoon at the age of 81. Senator McCain, thank you for your service to our country. Your legacy will endure for generations to come. Godspeed. pic.twitter.com/XbuGvT9LHZ
"Some lives are so vivid, it is difficult to imagine them ended. Some voices are so vibrant, it is hard to think of them stilled. John McCain was a man of deep conviction and a patriot of the highest order.” [...] Full statement by President George W. Bush https://t.co/FQVYWIUyGLpic.twitter.com/W8LCxJXRLi
Senator John McCain was an American patriot and hero whose sacrifices for his country, and lifetime of public service, were an inspiration to millions. Canadians join Americans tonight in celebrating his life and mourning his passing.
We are saddened to hear of the passing of @SenJohnMcCain. His decades of service will not be forgotten by the men & women of Arizona. May God grant the McCain family comfort and peace during this difficult time.
America lost a real hero today. Condolences to @cindymccain, the McCain family and the Arizonans who were so fortunate to have the opportunity to vote for a man of principle. John McCain’s sacrifice and the sacrifices made by all our POWs and MIAs must never be forgotten.
The nation has lost a great patriot and warrior. Whenever we were in a tough spot, we knew Senator McCain would be on our side with his characteristic toughness and integrity. The U.S. Navy mourns the loss of a true shipmate.
It is with great sadness to learn of the passing of @SenJohnMcCain.
Our thoughts and prayers are with his family, friends and those who served alongside him throughout his career. Full statement from #SecDef Mattis: https://t.co/7TMRmJpjpX
Tonight we say goodbye to a true hero. A man who never sought accolades. A patriot who fought everyday for American freedom and dignity. A warrior of strength, a patriot of heart, and a man of conviction. There will never be another John McCain. May he rest in peace. pic.twitter.com/B3FjQnDToH
I can’t stop thinking of the void McCain will leave behind. Nothing surpasses the loss for those who love him most. Then, there’s the loss for the nation he loves so much.
We’re losing him when he still had so much to give.
We’re losing him when we need his moral clarity most.
Honoring the memory and legacy of Senator John McCain, an American patriot, who served our great nation with distinction.
My prayers are with Senator McCain’s family and loved ones as our nation mourns his passing.