MUCH TO HIS chagrin, President Trump has discovered that there are three branches of government in the United States, each given power to check and balance one another's actions.

This wasn't accidental. The founding fathers created the executive, legislative and judicial branches to prevent a repeat of the "Do what we say . . . or else" orders that used to come down from England's King George III.

Washington, Jefferson, Adams, Franklin and the others who helped build our nation had a name for that practice: tyranny.

Those who wrote the Constitution fashioned an intricate web of governmental rights and responsibilities to prevent it from happening in the new republic. Congress and the president had the power to act, but the courts had the power to review, using the Constitution as the touchstone.

That exact phenomenon has been in play lately when it comes to the Trump administration's attempts to go after so-called "sanctuary cities" that refuse to let their local law enforcement agencies be commandeered by ICE, the federal agency that enforces immigration laws.

The modern equivalent of the "Do what we say . . . or else" is the administration's threat to stop the flow of federal money into cities and states that have refused to cooperate with the administration's efforts to deport as many illegal immigrants as possible.

So far, three executive immigration orders have been derailed by the courts since Trump took office.

The latest was earlier this week, when a federal judge in San Francisco issued a preliminary injunction against the federal government's threat to withhold federal aid to local governments that won't join the anti-immigrant campaign. Philadelphia is one of those cities.

Judge William Orrick ruled that only Congress has the power to place conditions on federal spending. Government lawyers argued that the administration did not plan to withhold the billions that flows from Washington, only the millions designated as aid for local law enforcement. In Philadelphia, that amounts to about $1.7 million.

Orrick said that argument was undercut by statements by Trump and Attorney General Jeff Sessions, who have said billions were at stake. The government saying one thing in court and another thing outside it was, the judge said, "a schizophrenic approach" bound to confuse local governments.

The feds have stated their intention is to "tighten the screws" on local government on the issue. That's hard to do when you have so many screws loose.

Questions raised by Orrick and others include:

While the federal government has exclusive right to enact immigration laws, does it also have a right to force local police to enforce those laws? Several judges think not.

Can it threaten to cut off funding of programs that have nothing to do with immigration or law enforcement? The U.S. Supreme Court has ruled otherwise, most recently in 2012 when it stopped the Obama administration from withholding Medicaid funds to force states to comply with Obamacare.

Is anyone listening to the arguments made by many local officials, including Mayor Kenney, that putting police in the role of ICE enforcers sabotages the efforts local law enforcement is making to connect with, and get the cooperation of, immigrant communities in fighting crime?

Clearly, Trump and Sessions are not. To hear them tell it, our cities are living hells because of illegal immigrants. So, they push on with this "Do what we say . . . or else" approach.

The only thing we can say is: It didn't work out for King George. What makes them think it will work out today?