After the Supreme Court ruled that President Trump could not block New York prosecutors and other investigators from seeing his financial records, he tweeted, “Courts in the past have given ‘broad deference’. BUT NOT ME!”

Although the court’s decision in the tax records case was well-reasoned and persuasive, the president was arguing — with characteristic touchiness — that he has been treated more harshly by the Supreme Court than his predecessors in the White House. There’s a grain of truth in his complaint. Trump’s success rate at the Supreme Court is quite low: He has prevailed only 47 percent of the time, a worse record than that of his predecessors going back at least as far as Franklin D. Roosevelt.

Since Roosevelt’s administration, presidents have won roughly two-thirds of their cases. During the Reagan years, the presidential victory rate reached 75 percent — which turned out to be the high-water mark. Each succeeding president has scored worse than that, bottoming out with Trump.

The downward trend suggests that the court is not singling out Trump. The high court is ruling against presidents of both parties more often in recent years. On the other hand, Trump’s basement-level rate suggests there is something distinctive about this administration. The likelihood is that his low victory rate is not due to unfair treatment by a Republican-dominated court but rather the incompetence of his administration.

In using the phrase “broad deference,” Trump was invoking a legal tradition that recognizes the central role of the president in government. This norm requires courts to give weight to the factual determinations made by the executive branch (for example, whether a substance subject to environmental regulation is toxic). It also requires courts to defer to the executive branch’s legal interpretations of statutes when those statues are ambiguous. Moreover, courts protect the president from litigation that intrudes on the office — for example, suits that interfere with the confidentiality of deliberations or that distract the president from his duties.

These rules never required courts to give the president complete deference, of course. Businesses, public interest organizations and private individuals have frequently persuaded courts to block presidential actions that violate the law. But the historical data suggest that deference to the chief executive has indeed been a guiding judicial principle — until recently.

As the accompanying graphic shows, the decline of deference to the president began with George H.W. Bush, and it accelerated during the Obama and Trump administrations, whose win rates fell far below the historical norm of 65 percent.

Trump’s dismal rate of success is all the more remarkable given the increasingly Republican complexion of the Supreme Court. President Barack Obama faced a majority of Republican appointees on the court, and so would naturally have faced a more hostile audience. Yet justices appointed by Republican presidents have voted in favor of the Trump administration to a lesser extent compared with the Obama administration (51 percent to 54 percent) and the George W. Bush administration (67 percent).

Trump would have us believe that he was treated unfairly not only by Republican-appointed justices but even by his own appointments. Justices Neil M. Gorsuch and Brett M. Kavanaugh have voted in favor of the Trump administration 39 percent and 57 percent of the time, respectively.

A better theory is that the Trump administration is inept. Evidence for this can be found in the administration’s victory record in the lower courts, where more run-of-the-mill cases are decided than in the Supreme Court. There, an astonishing statistic reveals itself: According to the Institute for Policy Integrity at New York University Law School, only 11 percent of Trump administration regulatory actions prevailed in the lower courts; the other 89 percent were blocked by courts or withdrawn. In contrast, academic research indicates that earlier presidents, since the 1990s or so, have prevailed 60 to 70 percent of the time on regulatory matters in the lower courts.

Many observers who have read the Trump administration’s regulatory impact assessments have been struck by the incompetence and bad faith evident in so many of the Trump arguments. For example, in a case decided last month, a panel of the U.S. Court of Appeals for the 9th Circuit vacated the Environmental Protection Agency’s approval of several herbicides after finding that the EPA flatly ignored some risks and downplayed others. If the Trump administration cannot make winning arguments in the lower courts, then it is hardly surprising that it does so badly in the Supreme Court as well.

And this is true despite the Republican domination of the court. The Republican-appointed justices on the court have their ideological and jurisprudential proclivities, and they no doubt approve of many of Trump’s policies. But they are also experienced professionals, and we suspect that in the depths of their hearts they are appalled by the incompetent performance of the Trump administration.

What explains the broader trend of declining presidential win rates in the Supreme Court? Scholars have proposed various explanations, which we examined a few years ago in an academic article. There is no evidence that the decline in presidential win rates is due to greater executive overreaching than in the past. Various potential measures of such overreach — for example, the number of executive orders a president issues — are not related to the win rate.

Nor has there been increasing ideological divergence between presidents and the justices. As noted, Republican-dominated courts have ruled against Republican presidents as well as Democratic presidents.

The more plausible explanation for the declining deference of the Supreme Court to the president is the public’s loss of confidence in the other institutions of government. Since John F. Kennedy, few presidents have been popular beyond their partisan base. Congress has been consistently unpopular, languishing in the 10 percent to 30 percent approval range for decades. Meanwhile, the court has managed to maintain a reputation for being largely trustworthy (with about 60 percent to 80 percent of the public expressing confidence in it). This has happened despite a significant rightward drift in the court’s decisions, which many Americans disapprove of.

While many people might take comfort that the Supreme Court will prevent an erratic president from indulging his authoritarian tendencies, another view is less rosy. As Americans lose confidence in democratic institutions at the national level, the country’s least democratic branch of government looks better and better.