President Trump asked his Twitter followers: “Do you get the impression that the Supreme Court doesn’t like me?”

A definitive answer might be difficult without doses of truth serum. But it should be clear by now that at least five of the nine justices have trust issues with the president and his administration.

Trump on Friday went from lambasting the “horrible & politically charged” Supreme Court setback he suffered the day before to labeling it a no-big-deal “request” for “enhanced papers.” His goal remains dismantling the Deferred Action for Childhood Arrivals (DACA) program protecting undocumented immigrants brought to the United States as children.

But what was unmistakable was that the president who has no patience for legal niceties has run into a Supreme Court that is all about them. For the second straight year, Chief Justice John G. Roberts Jr. has shown who gets the last word on that subject.

Advocate and critic alike note the similarities in Thursday’s DACA decision and last term’s ruling that stopped the administration from adding a citizenship question to the 2020 Census.

Both said the judiciary had the obligation to make sure the administration abided by the law in making important and controversial change. Both were written by Roberts and joined by the court’s liberal justices. Both found Trump officials deficient.

In his DACA decision, Roberts quoted the famous words of Justice Oliver Wendell Holmes Jr. a century ago: “Men must turn square corners when they deal with the government.”

Then Roberts added Justice Hugo Black’s more contemporary addendum: “The government should turn square corners in dealing with the people.”

Roberts’s cool, detached and technical opinion said the Trump administration’s haste to undo the program implemented eight years ago by the Obama administration got the better of the Department of Homeland Security’s obligation to weigh its impact: on the hundreds of thousands of DACA recipients who had identified themselves, on their families, on their 200,000 U.S. citizen children and on their contributions to the country’s economy and tax base.

“That failure was arbitrary and capricious in violation” of the Administrative Procedure Act, Roberts wrote.

Trump’s reaction was expected. But Roberts drew withering fire from his conservative colleagues on the court, and his (former?) conservative allies in the political world. They described his opinion as niggling at best and, at worst, disingenuous.

“Today’s decision must be recognized for what it is: an effort to avoid a politically controversial but legally correct decision,” wrote Justice Clarence Thomas, joined by two other conservative justices.

He said the opinion’s “timidity forsakes the court’s duty to apply the law according to neutral principles, and the ripple effects of the majority’s error will be felt throughout our system of self-government.”

Thomas would have found that DACA was “unlawful from its inception.”

Sen. Ted Cruz (R-Tex.) ignored the other four justices in the majority — Ruth Bader Ginsburg, Stephen G. Breyer, Sonia Sotomayor and Elena Kagan — and more or less accused Roberts of betraying his oath of impartiality.

“Sadly, over recent years, more and more Chief Justice Roberts has been playing games with the court to achieve the policy outcomes he desires,” Cruz said, adding, “Chief Justice Roberts knows exactly what he is doing.”

Sen. Tom Cotton (R-Ark.) joined in. “John Roberts again postures as a Solomon who will save our institutions from political controversy and accountability,” the senator said in a statement. “If the chief justice believes his political judgment is so exquisite, I invite him to resign, travel to Iowa, and get elected.”

It fell to such unusual suspects as former homeland security secretary Janet Napolitano to defend the court. She was involved in establishing DACA and has led an effort, now as president of the University of California system, to fight Trump’s efforts to dismantle it.

“Justice and the rule of law won the day,” she said.

There’s no denying that Roberts, 65, has played the pivotal role in rescuing two of former president Barack Obama’s proudest achievements: the Affordable Care Act and DACA.

And the past week at the Supreme Court left some on the political right wondering what they had achieved with a majority of Republican-appointed, ideologically conservative justices.

Roberts and Justice Neil M. Gorsuch joined the liberals in reading Title VII of the Civil Rights Act as protecting LGBTQ workers from being fired solely because of their sexual orientation or gender identity. It passed up another immigration case, regarding California’s so-called sanctuary laws.

And without explanation, the court disappointed gun rights groups by refusing to take up a host of challenges to gun-control laws across the country.

But the most recent Supreme Court action tends to obscure what has come before.

Roberts, for instance, also played the pivotal role in Trump’s biggest triumph at the Supreme Court. It found that he had the authority to impose a travel ban on those from mostly Muslim countries.

And those who praise Roberts for joining the majority opinion finding federal protection for workers look past the fact that he does not believe the Constitution provides gay couples with a right to marry.

He was on the losing side of Obergefell v. Hodges, and felt so strongly that the court was making the wrong decision that he read part of his dissent from the bench, the only time he has done so since he joined the court in 2005.

Stephen Vladeck, a constitutional law professor at the University of Texas who watches the court closely, said in a New York Times opinion piece this week that the court “quietly” enables the Trump administration.

The president’s lawyers have sought 29 emergency stays from the Supreme Court — including 11 during the current term alone — far more than previous administrations. Most of the time, the court grants relief.

In that way, the court allowed the administration to put much of its travel ban in place before determining its legality, allowed the president to divert military funds to pay for the U.S.-Mexico border wall, and implemented several controversial changes in refugee and immigration law while lower courts were hearing legal challenges.

After the DACA decision, Vladeck tweeted: “It’s not that Chief Justice Roberts is a closet progressive. He’s not. It’s that the Trump administration is *really bad* at administrative law.”

Moreover, some Republicans are happy to leave DACA in the administration’s hands. A decision that threw into peril the lives and livelihoods of nearly 650,000 would likely have required congressional action during a campaign season already tough for the GOP.

“We don’t have the time, nor the bandwidth, to do any of that,” said a senior congressional GOP aide, who spoke on the condition of anonymity to candidly discuss the ruling’s political ramifications. “In a way, this is like the best option.”

The difference of views on the ruling among Republicans was exemplified by the contrasting reactions between Cruz — who blasted Roberts as an “elite” who didn’t understand the dangers of illegal immigration — and his fellow Republican and Texan, Sen. John Cornyn, who is up for reelection this fall.

“I believe the Supreme Court has thrust upon us a unique moment and an opportunity,” Cornyn said during floor remarks. “We need to take action and pass legislation that will unequivocally allow these young men and women to stay in the only home, in the only country, they’ve known.”

Roberts’s pivotal role on the court will likely be highlighted in its closing weeks, as the court considers important cases involving the separation of church and state, and abortion.

And as for Trump and the Supreme Court, wait for the end of the term. That is probably when the justices will decide his long-running battle to shield his personal financial records from Congress and a New York prosecutor.