Senator John McCain lay in state on Friday in the Capitol whose halls he prowled for decades, hailed as a war hero, a principled lawmaker, and a restless fighter for his beliefs — and honored with a ceremony reserved for the country’s most revered figures.

On a day when President Trump was conspicuously absent — by Mr. McCain’s own design — the senator rested in an American flag-draped coffin under the Capitol dome, as the vice president, congressional leaders and prominent lawmakers past and present from both parties, military and cabinet officials and members of the public took turns participating in a bipartisan show of respect.

The remembrances of Mr. McCain, whose death has underscored the demise of his particular brand of pragmatic and civil politics, served as a counterpoint to the discourse surrounding the sitting president, and a reminder of the Arizona senator’s place in American history.

“Half a world away, wearing our nation’s uniform, John McCain stood up for every value that this Capitol building represents,” said Senator Mitch McConnell, Republican of Kentucky and the majority leader. “Then he brought that same patriotism inside its walls, to advocate for our servicemembers, 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.”