In many ways, John McCain prepared America for this day.

Diagnosed with brain cancer 14 months ago, McCain hadn’t returned to Washington since December. Before he left, he told some of his colleagues he knew it would be his final time roaming the halls of the United States Senate, where he served for 31 years. Many of McCain’s closest friends and colleagues were flying to Arizona in recent months for one last visit.

But on Friday morning inside the rotunda of the United States Capitol building, nobody was prepared to say goodbye.

Nearly all senators, 50 House members, McCain’s family and staff, more than 100 foreign dignitaries and members of the diplomatic corps, Trump administration officials—though not the president himself—and former lawmakers gathered inside the rotunda, as McCain became the 13th senator to lie in state in the U.S. Capitol.

Thousands of people waited outside in 85-degree heat for their chance to pay their respects to the late senator and Vietnam War hero.

From the moment McCain arrived, the ceremony took on an almost cinematic quality. As his American flag-draped casket was carried up the marble steps of the east front of the Capitol by a military honor guard, a cloud that had formed above the building opened up. Suddenly, it was pouring rain as the sun shined elsewhere in the city.

The honor guard continued unfazed, walking through the massive iron doors into the rotunda and placing McCain’s casket on the same black catafalque used when President Abraham Lincoln lay in state on April 20, 1865. The casket was sat in the center of the large, ornate room through which McCain walked thousands of times as he spent early mornings and late nights cutting deals on important legislation, bridging the partisan divides that have plagued Congress in recent years, and making lifelong friends along the way.

“Thank you for lending him to us longer than we had a right. Thank you for supporting him while he supported us,” Senate Majority Leader Mitch McConnell (R-KY) said, addressing the McCain family directly. The usually stoic McConnell’s voice often wavered as he paid tribute to a man who, over the years, often made his life much more difficult as he tried to shepherd legislation through the Senate.

One by one, mourners made their way to the casket. His 106-year-old mother Roberta was wheeled to her son’s side by her grandson where she silently made the sign of the cross. Former Secretary of State Henry Kissinger, who was among the former U.S. officials who attended the ceremony, stepped out of his wheelchair before approaching McCain’s casket.

In one of the most powerful moments of the ceremony, McCain’s fellow prisoner of war, 87-year-old Rep. Sam Johnson (R-TX), found the strength to stand from his motorized scooter and walk to say his goodbye, with the help of House Minority Leader Nancy Pelosi (D-CA). Not only did both men spend years in the Hanoi Hilton together, they shared a cell for part of their captivity.

McCain, throughout his more than 36 years of service in Congress, made a conscious effort to forge personal relationships with each of his colleagues, often stressing that it was the best way to solve problems and legislate effectively.

“John and I had a long personal talk his last day here. We knew it was the last time we were going to see each other. We knew he was not coming back,” Sen. Patrick Leahy (D-VT) told The Daily Beast as he was leaving the rotunda. Leahy noted that even his wife Marcelle, who attended Friday’s ceremony, had a close personal relationship with McCain. Both Marcelle Leahy and McCain battled the same type of melanoma earlier in life.

“He almost died of it. She almost died of it. And they would check on each other all the time. He’d see her in the hallway and he’d just walk up to her and go like this,” Leahy said, putting his hand on this reporter’s cheek. “And she’d do the same to him. They’d hug. They wouldn’t say a word.”

Notably absent from the ceremony was President Donald Trump. It was just as McCain wanted.

Instead, the duty of comforter-in-chief fell to Vice President Mike Pence, who awkwardly extended condolences from the Oval Office.

“The president asked me to be here on behalf of a grateful nation to pay a debt of honor and respect to a man who's served our country throughout his life,” Pence said, in a remark that drew curious looks from lawmakers and other attendees. Pence was joined by other top administration officials, including White House chief of staff John Kelly, counselor Kellyanne Conway, national security adviser John Bolton, Attorney General Jeff Sessions, Deputy Attorney General Rod Rosenstein, Director of National Intelligence Dan Coats, and Defense Secretary Jim Mattis.

Lawmakers and others who served in the military saluted McCain. Sen. Jack Reed (D-R.I.), who was an Army major and McCain’s counterpart atop the Senate Armed Services Committee, briefly stood at attention and saluted. Former Sens. John Warner (R-VA), 91, and Carl Levin (D-MI) locked arms as they slowly approached McCain’s casket. Warner, who appeared very frail, saluted as the 84-year-old Levin held him up.

“Half a world away, wearing our nation’s uniform, John McCain stood up for every value that this Capitol building represents,” McConnell said. “Then, he brought that same patriotism inside its walls—to advocate for our service members, our veterans, and our moral leadership in the world. So it is only right that today, near the end of his long journey, John lies here.”

The funerals and memorials for McCain the past few days have been choreographed exactly to McCain’s liking—he planned them, after all. The late senator chose Russian dissident Vladimir Kara-Murza to be a pallbearer. It was one final dig at Russian President Vladimir Putin, who was perhaps McCain’s greatest foe on the international stage. Kara-Murza approached the casket and bowed his head as he held back tears.

“ Half a world away, wearing our nation’s uniform, John McCain stood up for every value that this Capitol building represents. ” — Senate Majority Leader Mitch McConnell (R-KY)

The contingent of sitting senators, who spent the week wondering just how they could fill McCain’s irreplaceable void in the Senate, were stone-faced as they walked by McCain’s casket. Others, including Sen. Kirsten Gillibrand (D-N.Y.), began to cry. McCain’s 33-year-old daughter, Meghan, teared up as she approached and eventually stood next to her father’s casket. Former Sen. Joe Lieberman (I-CT), who with McCain and the late Sen. Ted Kennedy (D-MA) was part of the “Three Amigos” clan, blew a kiss to his longtime friend.

McCain’s best friend in the Senate, Sen. Lindsey Graham (R-S.C.), sat with the family during the service. When it was his turn to approach McCain’s casket, he placed his right hand on top of the American flag.

“Thank you, my friend,” he said.

After the ceremony, Graham escorted Cindy McCain into the Senate chamber. The widow sat at her husband’s desk, which was draped in a black cloak with white roses on top; Graham sat at his own desk, which is adjacent.

A half-hour later, the pair emerged from the Senate chamber, each holding a single white rose.