A Conservative Court and Trump’s Own Appointees Declare Their Independence

But the two justices only followed in the footsteps of their predecessors by rejecting the president who put them on the court. While each of them has generally sided with Mr. Trump since taking office, in this case they drew a line. Neither is personally close to Mr. Trump nor is either thought to be much of an admirer of the president, so some saw the decision as a way to distance themselves.

“My guess is their feeling about him is, ‘We intend to be on this court long after he is a bad memory, and if his administration is about to come crashing down, we might as well have been people who weren’t willing to completely blow up the Constitution for him,’” said Richard Primus, a constitutional scholar at the University of Michigan Law School, adding that they would do so only if they also saw it as “the right legal answer.”

Mike Davis, who as a congressional aide helped confirm both of Mr. Trump’s justices and now leads the Article III Project to support his other judicial nominees, said the president should not be too disappointed in his appointees.

“I would say, ‘Mr. President, you appointed judges, not puppets, and they’re going to follow the law and it doesn’t matter who appointed them,’” Mr. Davis said. “Despite perceived setbacks here and there, President Trump’s transformation of the federal judiciary is his biggest accomplishment.”

Kayleigh McEnany, the White House press secretary, said she did not ask Mr. Trump specifically for his reaction to the position taken by Justices Gorsuch and Kavanaugh, but insisted that “his justices did not rule against him.”

Like the president’s other aides, she focused on the fact that the court sent the cases back to lower courts for further proceedings with standards for Mr. Trump to meet if he wants to avoid subpoenas, and she cited cautions in the ruling against fishing expeditions. “That language made it pretty clear that this was a win for the president,” Ms. McEnany said. “The justices did not rule against him.”

In a concurrence in the New York case, joined by Justice Gorsuch, Justice Kavanaugh flatly dismissed Mr. Trump’s constitutional argument. “In our system of government, as this court has often stated, no one is above the law,” he wrote. “That principle applies, of course, to a president.”