If Donald Trump is the in-your-face chief executive, John Roberts has perfected the art of being the nearly invisible chief justice. He can be tough on the bench during arguments and in the justices’ private conference as well, but in public he exudes a self-deprecating diffidence.

Here’s an example: In the early 1980s, when John Roberts was a Supreme Court law clerk, Chief Justice Warren E. Burger would travel every year to the American Bar Association’s midwinter convention to give a “state of the judiciary” speech, unrolled as a grand occasion in the manner of the State of the Union. His successor, William H. Rehnquist, dialed the speech back, issuing it through the press office rather than delivering it in person.

At the end of 2009, his fifth year on the job, Chief Justice Roberts boiled it down to one page. He said that “when the political branches are faced with so many difficult issues, and when so many of our fellow citizens have been touched by hardship, the public might welcome a year-end report limited to what is essential.” All that people needed to know was that “the courts are operating soundly, and the nation’s dedicated federal judges are conscientiously discharging their duties.”

Imagine President Trump stepping back from the stage in such a manner.

The chief justice, a strategic thinker with exemplary work habits, is every bit a match for the president. He is a very good lawyer with very conservative instincts, and his own long-range game plan includes getting the government out of the business of taking account of race, even for the purpose of protecting voting rights or preserving the hard-won gains of integration. On rare occasions, notably in the two Affordable Care Act cases, his lawyerly instincts outweigh his ideological preferences.

The question now is to what extent he is willing to lead his court in standing up against a president who, it is hardly far-fetched to imagine, may trample the First Amendment, withhold information the law regards as subject to disclosure, or defy court orders on immigration or other matters. The signs are equivocal at best. Chief Justice Roberts was not on the Supreme Court for the first round of post-Sept. 11 cases, and was recused from the second round because he had participated in the case, Hamdan v. Rumsfeld, as a federal appeals court judge.

Then in 2008 came Boumediene v. Bush, a 5-to-4 decision with a majority opinion by Justice Anthony M. Kennedy. It held that the Guantánamo detainees had a constitutional right to petition federal judges for writs of habeas corpus. Chief Justice Roberts signed a hyperbolic dissenting opinion by Justice Scalia that opened with “America is at war with radical Islamists” and went on to warn that the decision “will almost certainly cause Americans to be killed.” Perhaps more to the present point, the chief justice also filed a dissenting opinion of his own, in which he asked rhetorically who had won the case. The answer, he said, was “certainly not the American people, who today lose a bit more control over the conduct of this nation’s foreign policy to unelected, politically unaccountable judges.”