If Donald Trump is elected, he’s promised to move quickly to suspend Muslim immigration, or maybe even stop people from entering the United States “from any nation that has been compromised by terrorism.” We’ll withdraw from NATO unless all other members pay their fair share, either renegotiate or shred NAFTA and begin “extreme vetting” of immigrants to make sure they aren’t sneaking in any “hostile attitudes toward our country or its principles.” Before you can say “Geneva Conventions,” he’ll order the waterboarding of suspected terrorists and approve interrogation techniques “a hell of a lot worse than waterboarding,” too, including the killing of the families of terrorism suspects. He might (or might not, or might) deport 11 million undocumented immigrants. But “on Day One,” he insists, we will definitely “begin working on an impenetrable, physical, tall, powerful, beautiful, southern border wall.”

Only, Washington has some pretty high walls in place, too, and electric fences that might shock any newcomer naive enough to believe Trump’s line about “criminal aliens”: that on “Day One, my first hour in office, those people are gone.” In a real sense, this town exists to serve the liberal, constitutional order, and President Trump would face fierce and sustained resistance to his “because I say so” threats to that order — not only from the other party but from his own, and from the nonpartisan civil servants who run the government day to day.

Should he try to make good on his most controversial promises, he’d find, as President Obama has, that the judiciary can block executive action with injunctions that there is no way around. Congress would have to agree to fund his proposals, almost all of which would require more government spending rather than less. And he’d be up against executive-branch workers who, even without staging an open revolt, can slow-walk implementation just about indefinitely.

The most reliable action to block those Trump proposals that so many in both parties find unconstitutional would come from the courts, which would prevent the United States from walking away from international norms and treaty obligations. A flurry of lawsuits would surely answer Trump’s opening gambit, and injunctions could jam, say, an executive order on “extreme vetting.” Trump could likewise order that we cut our contribution to NATO, but because that, like NAFTA, involves a treaty obligation, this move, too, would be challenged in court.

“There really is no way to stop him from issuing a whole series of unconstitutional and illegal orders and rolling the dice,” says Leon Panetta, who served in Congress, as CIA director and defense secretary under Obama, and as President Bill Clinton’s White House chief of staff. “But they would be immediately contested in court.”

Panetta added: “I can’t think of one thing he’s recommended that, without some serious compromise on his part, would be enacted. No matter which way he turns, he’s going to run into a wall — not one that he’s built, but the one that’s been in place since the beginning of the republic.” The Constitution, in other words.

Obama learned that lesson after issuing his 2014 order that the Department of Homeland Security would not deport some undocumented parents of U.S. citizens or permanent residents, and would expand a program shielding millions of undocumented immigrants who came to the United States as children. Texas argued that not deporting some undocumented immigrants would raise the cost of issuing driver’s licenses. A court in that state blocked Obama’s order, and in June, a 4-to-4 split on the Supreme Court allowed the Texas ruling to stand.

If lower courts similarly hindered Trump’s proposals, it’s theoretically possible that he could eventually get his way by packing the Supreme Court. But even that’s not a sure thing. As Robert George, a professor of jurisprudence at Princeton and a Republican critic of both Trump and Hillary Clinton, puts it: “If Trump picks the judges he claims he’s going to pick — which, like all Trump’s claims, is not a claim I trust — then he’d have problems in the courts with some of his edicts, just as Obama has had. But there is always the possibility that his judges will not be the brilliant, distinguished conservative jurists on the list he got from the Federalist Society but rather his cousin’s divorce lawyer in Teaneck, the guy who handled zoning permits for him for one of his golf course developments in South Carolina, and his sister who is already a federal judge.”

Congress also has a significant role to play. Because “extreme vetting” would require additional funding to screen immigrants for bad thoughts, lawmakers would have to alter the way the entry process works now. They could stop the Trump train by passing a law against screening immigrants for bad thoughts — or just by neglecting to fund the extra work Trump would be making for the already understaffed Immigration and Customs Enforcement agency. Trump has vowed that “we are going to triple the number of ICE deportation officers. . . . We’re also going to hire 5,000 more Border Patrol agents.” But he couldn’t do anything of the sort without congressional action. If control of the Senate shifts to Democrats, such a thing is even less likely.

The fact that all Cabinet secretaries and other high-level appointees, including to the federal judiciary, have to be confirmed by the Senate gives the legislative branch considerable leverage, as Obama has also seen. And as for the wall along our southern border, Congress may not see this massive infrastructure project as a priority, since illegal immigration is at its lowest ebb in 20 years.

Then there are the civil servants of the executive branch, who — as John F. Kennedy complained in calling the State Department “a bowl of Jello ” — can effectively kill policy by failing to implement it. Richard Nixon accused federal bureaucrats of resisting any and all change, because they “have a vested interest in the chaos in which they exist.”

Federal workers are in a strong position to resist. One scientist who has spent 35 years at the Environmental Protection Agency (and who asked to speak on the condition of anonymity to discuss political matters) said that after the “hostile takeover” of the agency under Ronald Reagan, career folks initially tried to work with political appointees. But when they concluded that they were really being asked to break laws on water, air and waste, they began complaining to Democrats on Capitol Hill, who held oversight hearings. “And there was a certain amount of setting the political people up,’’ the scientist said, by telling House staffers preparing the hearings what questions to ask and then watching Reagan’s appointees get “slaughtered.”

Although he’s seen many direct confrontations over the decades — and stretches when the EPA softball league was more active than the workplace — the civil servant said he had never seen anyone pushed out for pushing back, especially since political appointees can be personally sued in cases of retribution. At any rate, civil-service protections require a whole series of administrative proceedings to remove an intransigent bureaucrat.

And when the political operatives find ways to circumvent the dissenting civil servants? “If they’re doing things that are illegal, it’s your responsibility to advise them of that, and if they don’t listen, then you resign or you spill the beans.” During the George W. Bush administration, Sylvia Lowrance and Eric Schaeffer resigned from the EPA’s Office of Enforcement and Compliance Assurance to protest the administration’s insistence that they downplay their enforcement actions.

Sometimes even the appointees disagree with the White House: In 1996, when Bill Clinton made good on his promise to “end welfare as we know it” without also creating the programs that were supposed to help move poor single moms into well-paying jobs, the president’s old friend Peter Edelman , then an assistant secretary at the Department of Health and Human Services, resigned in protest , along with his colleague Mary Jo Bane, who like Edelman had advocated a very different kind of welfare reform. An order from Trump approving waterboarding or other “enhanced interrogation” methods would almost certainly prompt high-profile resignations as well.

The purely practical difficulties President Trump would face in trying to accomplish such amorphous goals as assuring that “those we are admitting to our country share our values and love our people” are yet another check on his proposed agenda. He is in such a hurry, and routinely promises to move so quickly, that just watching him would give the rest of us vertigo. (“That wall will go up so fast, your head will spin.”) But even if “The Exorcist” was set in Georgetown, this is a city best known for gridlock. And Trump’s impatience, more than anything else, is the best reason to doubt that his resolve would outlast official Washington’s resistance.