"Disgraceful" and "an absolute disaster" were some of the ways Trump characterized Roberts as he campaigned.

Come Jan. 20, Roberts will administer the oath of office, the two men will shake hands and then Roberts will recede into the background. For now.

Roberts and the rest of the Supreme Court probably will be called on to review Trump's major undertakings as president. Trump could need Roberts' vote on matters ranging from immigration to health care to environmental regulations.

Will it matter that in the course of the campaign, Trump had harsh words for the leader of the federal judiciary? The pointed criticism of a justice by name was only one in a long list of unusual aspects of Trump's campaign for the presidency.

"Justice Roberts really let us down," Trump told an audience in Aiken, South Carolina, last December. "What he did with Obamacare was disgraceful, and I think he did that because he wanted to be popular inside the Beltway," he added, referring to greater Washington.

A month later, in an interview with ABC News' George Stephanopoulos, Trump again referred to the health care decisions when he said, "Justice Roberts turned out to be an absolute disaster."

Roberts was savaged by several Republican presidential candidates, an unusual spectacle given Roberts' appointment by a Republican president and his generally conservative record. Roberts has not responded to the criticism. Among the justices, Ruth Bader Ginsburg made plain her dislike of Trump in July, then walked back her comments a few days later.

Trump's controversial idea about keeping Muslims out of the U.S. would certainly face a court challenge if his administration tries to put it in place. Environmental groups that have been fighting for Obama-era regulations would be expected to fight Trump efforts to roll those back.

In these and other areas where the extent of the president's power is at stake, the Supreme Court could have the final word.

As chief justice of a court that is divided between four liberal appointees of Democratic presidents and four more conservative justices who were put on the court by Republicans, Roberts has said he has spent even more time than usual seeking agreement.

The potential for deadlock will disappear once Trump nominates and the Senate confirms someone to fill the seat that has been vacant since Justice Antonin Scalia's death in February.

But even then, Roberts might see the value in consensus, said Artemus Ward, a political science professor at Northern Illinois University who has written about the Supreme Court.

"Does the court want to issue divided opinions to a divided country on divisive issues?" Ward asked.

The inauguration-day meeting between Roberts and Trump may have its closest parallel in the contentious relationship between Earl Warren and Richard Nixon, old Republican political rivals in California.

In January 1969, Warren was the chief justice who asked Nixon to raise his right hand and repeat the presidential oath. In that campaign, Nixon ran against the liberal Warren Court on a law-and-order platform.

"One of the most painful moments of Warren's life had to be swearing in Nixon," said Jim Newton, author of the Warren biography "Justice for All."

But there is no evidence from records of the 1968 presidential race that Nixon personally disparaged Warren, Newton said. The chief justice already had announced that he would retire from the Supreme Court and Nixon knew he would appoint a successor if he won.

Days before his death in 1974, Justices William Brennan and William Douglas visited Warren in his Washington hospital room. Nixon's presidency was mired in the Watergate scandal and it was about to receive a final blow in the form of a Supreme Court decision ordering the president to turn over secretly recorded audiotapes. Warren pleaded with his old colleagues to hold Nixon accountable and not let the president be above the law.