The opinions expressed by columnists are their own and do not necessarily represent the views of Townhall.com.

Last week, President-elect Donald Trump re-emphasized the approach he will take in enforcing the nation's immigration laws, which is much different from the manner of enforcement utilized by President Barack Obama. The latter pointedly declined to deport the 5 million undocumented immigrants in the United States who are the parents of children born here -- children who, by virtue of birth, are American citizens. Trump has made known his intention to deport all undocumented people, irrespective of family relationships, starting with those who have committed crimes.

In response to Trump's stated intentions, many cities -- including New York, Chicago, Los Angeles and San Francisco -- have offered sanctuary to those whose presence has been jeopardized by the president-elect's plan. Can they do this?

Here is the back story.

Under the Constitution, the president is the chief federal law enforcement officer in the land. Though the president's job is to enforce all federal laws, as a practical matter, the federal government lacks the resources to do that. As well, the president is vested with what is known as prosecutorial discretion. That enables him to place priority on the enforcement of certain federal laws and put the enforcement of others on the back burner.

Over time -- and with more than 4,000 criminal laws in the United States Code -- Congress and the courts have simply deferred to the president and permitted him to enforce what he wants and not enforce what he doesn't want. Until now.

Earlier this year, two federal courts enjoined President Obama -- and the Supreme Court, in a tie vote, declined to interfere with those injunctions -- from establishing a formal program whereby undocumented people who are the parents of natural-born citizens may lawfully remain here. It is one thing, the courts ruled, for the president to prioritize federal law enforcement; it is quite another for him to attempt to rewrite the laws and put them at odds with what Congress has written. It is one thing for the president, for humanitarian reasons or because of a lack of resources, to look the other way in the face of unenforced federal law. It is another for him to claim that by doing so, he may constitutionally change federal law.

Trump brilliantly seized upon this -- and the electorate's general below-the-radar-screen disenchantment with it -- during his successful presidential campaign by promising to deport all 13 million undocumented immigrants currently in the United States, though he later reduced that promise so as to cover only the 2 million among them who have been convicted in the United States of violating state or federal laws.

Enter the sanctuary cities. These are places where there are large immigrant populations, among which many are undocumented, yet where there is apparently not a little public sentiment and local governmental support for sheltering the undocumented from federal reach. Trump has argued that these cities are required to comply with federal law by actively assisting the feds -- or at least not aggressively resisting them.

Thus the question: Are state and local governments required to help the feds enforce federal law? In a word: No.

The term "sanctuary cities" is not a legal term, but it has been applied by those in government and the media to describe municipalities that offer expanded social services to the undocumented and decline to help the feds find them -- including the case of Chicago's offering undocumented immigrants money for legal fees to resist federal deportation. As unwise as these expenditures may be by cities that are essentially bankrupt and rely on federal largesse in order to remain in the black, they are not unlawful. Cities and towns are free to expand the availability of social services however they please, taking into account the local political climate.

Enter the Supreme Court. It has required the states -- and thus the municipalities in them -- to make social services available to everyone resident within them, irrespective of citizenry or lawful or unlawful immigration status. This is so because the constitutional command to the states of equal protection applies to all persons, not just to citizens. So the states and municipalities may not deny basic social services to anyone based on nationality or immigration status.

The high court has also prohibited the federal government from "commandeering" the states by forcing them to work for the feds at their own expense by actively enforcing federal law. As Ronald Reagan reminded us in his first inaugural address, the states formed the federal government, not the other way around. They did so by ceding 16 discrete powers to the federal government and retaining to themselves all powers not ceded.

If this constitutional truism were not recognized or enforced by the courts, the federal government could effectively eradicate the sovereignty of the states or even bankrupt them by forcing them to spend their tax dollars enforcing federal law or paying for federal programs.

Thus the Trump dilemma. He must follow the Constitution, or the courts will enjoin him as they have his predecessor. He cannot use a stick to bend the governments of sanctuary cities to his will, but he can use a carrot. He can ask Congress for legislative grants of funds to cities conditioned upon their compliance with certain federal immigration laws.

All of this is part of our constitutional republic. By dividing powers between the feds and the states -- and by separating federal powers among the president, Congress and the courts -- our system intentionally makes the exercise of governmental power cumbersome by diffusing it. And since government is essentially the negation of freedom, the diffusion of governmental powers helps to maximize personal liberty.