DONALD TRUMP clearly holds grudges. He has hurled insults at governors, senators, a judge who recently ruled against him and Miss Universe 2014. He has also attacked the press, arguing that as president he will “open up” libel laws so he can sue newspapers that publish “purposely negative and horrible and false articles” about him.

Mr. Trump’s critics wonder whether a man with such a violent temper can be trusted with the presidency. But his defenders, like Senator John McCain and the Senate majority leader, Mitch McConnell, assure us that the Constitution will constrain him.

“I still believe we have the institutions of government that would restrain someone who seeks to exceed their constitutional obligations,” Mr. McCain told The New York Times. “We have a Congress. We have the Supreme Court. We’re not Romania.”

Under the principle of separation of powers, the president shares power with Congress and the judiciary. The party system, the press and American political traditions may constrain him as well. But what would this mean in practice if Mr. Trump wins?

It depends on what Mr. Trump wants to do. His signature issues are immigration and trade. He could not build the Mexican wall without congressional support. But he could order immigration authorities to deport unauthorized immigrants.

And he could bar Muslims from entering the country under existing law, which authorizes him to bar classes of aliens whose entry he determines “would be detrimental to the interests of the United States.” It wouldn’t be the first time: President Ronald Reagan cited this law, as well as his inherent constitutional powers, to block a flood of Haitian migrants from pouring into United States territory in 1981.

Can he slap tariffs on China, as he has threatened? Yes, he can. Congress has delegated to the president the power to retaliate against foreign countries that engage in unfair trade practices like dumping, leaving it to the president and trade officials to determine what that means. In 2002, President George W. Bush imposed steel tariffs on China and other countries for what everyone understood were political reasons.

The World Trade Organization ruled the steel tariffs illegal in that case. But Mr. Trump could simply ignore its judgment, and indeed withdraw the United States from the W.T.O., just as President Bush withdrew the United States from the Antiballistic Missile Treaty in 2002. While he’s at it, Mr. Trump could tear up the North Atlantic Treaty, which created NATO, an organization that he has called “obsolete.”

In May, Mr. Trump vowed to rescind President Obama’s environmental policies. He would be able to do that as well. He could disavow the Paris climate change agreement, just as President Bush “unsigned” a treaty creating an international criminal court in 2002. He could choke off climate regulations that are in development and probably withdraw existing climate regulations. Even if a court blocked him, he could refuse to enforce the regulations, just as Mr. Obama refused to enforce immigration laws.

In wielding executive power in these ways, Mr. Trump would be following in the footsteps of his predecessors. President Bush cited his commander in chief powers in order to justify interrogation, surveillance and detention polices in the wake of Sept. 11. While Mr. Obama has shied away from Mr. Bush’s constitutional arguments, he has interpreted statutes aggressively, while also relying on constitutional authorities, to justify the military intervention in Libya in 2011 and his nonenforcement of immigration laws.

Mr. Trump has expressed impatience with his critics and hinted that he would use federal powers against them. He wouldn’t be able to put someone in jail merely for criticizing him. But he could direct agencies to use their vast regulatory powers against the companies of executives who have displeased him, like Jeff Bezos, for example, the founder of Amazon. Mr. Trump has already hinted that he would go after Amazon for supposed antitrust violations.

He could direct the Department of Justice to investigate his critics by prioritizing categories of crimes they may have committed. Political opponents could be accused of campaign finance law violations. Former government officials, like Hillary Clinton, could be accused of violating secrecy laws. Even if the charges come to nothing, the legal fees for defendants will be hefty.

Mr. Trump could also crack down on journalists who report on national security issues by enforcing federal secrecy laws more aggressively than previous presidents. President Obama received a lot of criticism for prosecuting government employees who leaked secrets, but the Justice Department did not bring charges against the journalists who published the leaked information.

What couldn’t Mr. Trump do? He couldn’t lower (or raise) taxes on his own. He’s supposed to spend funds that Congress appropriates and for the things that Congress appropriates them for — that’s what stands in the way of the wall (unless he persuades Mexico to pay for it and construct it on the other side of the border).

He could not follow through on his promise to impose the death penalty on killers of police officers by executive order. And even where he does act, he needs to make sure his legal theories are in order. If he wanted to withdraw climate regulations because climate change is a hoax perpetuated by China, no court would allow him to. But if he said that the climate regulations were based on a speculative assessment of harms that wouldn’t occur for 100 years, he could succeed.

Much depends on how far Mr. Trump is willing to push existing legal understandings. There is a netherworld of laws that presidents are supposed to comply with but courts don’t enforce. He could send military forces into a foreign country without authorization from Congress; courts would most likely stay out of the dispute. What of his suggestion earlier this year to kill the families of terrorists? Courts typically defer to the executive on matters concerning military activities abroad. He might even try to withhold appropriated funds or shift them around in defiance of Congress’s wishes.

What, then, stands between us and a nearly unbounded Mr. Trump, aside from the next election? Senators McCain and McConnell say Congress, but only a veto-proof majority in both houses, passing new laws, could stop Mr. Trump from exercising the legal authority that Congress has already given the president. Congress can threaten to withhold funds, but the president’s powers to veto legislation and appoint government officers give him a large bargaining chip. Removal of a president by impeachment is extremely difficult; it has never happened.

The courts are another barrier, but they would need to reverse their longstanding practice of deferring to the president in matters of foreign affairs and domestic regulation. The Supreme Court could, for example, declare an entry bar on Muslims unconstitutional. But it’s hard to predict how Mr. Trump would respond. After a federal judge, Gonzalo Curiel, ruled against him on a motion in the long-running Trump University litigation, Mr. Trump called him a “hater” and a “Mexican” (Judge Curiel is an American).

Mr. Trump’s biggest obstacle to vast power is not the separation of powers but the millions of federal employees who are supposed to work for him. Most of these employees have a strong sense of professionalism and are dedicated to the mission of their agency. They don’t take kindly to arbitrary orders from above. As President Harry Truman said ahead of Dwight D. Eisenhower’s presidency: “He’ll sit here, and he’ll say, ‘Do this! Do that!’ And nothing will happen.”

To make things happen, Mr. Trump will need to get loyalists into leadership positions of the agencies, but to do so, he will need the cooperation of the Senate (or he will need to aggressively exploit his recess appointment powers). Moreover, the small number of politically appointed leaders enjoy only limited control of the mass of civil servants. These employees can drag their feet, leak to the press, threaten to resign and employ other tactics to undermine Mr. Trump’s initiatives if they object to them. They’re also hard to fire, thanks to Civil Service protections.

But Mr. Trump can fight back. He can appoint loyalists not only to political positions in the executive branch, but to the courts, and he may be able to attract them to the ranks of the Civil Service. And while executive branch officials who disregard the law might be prosecuted by the Justice Department, President Trump would have one more trick up his sleeve. Like President George H.W. Bush, who rescued Iran-contra defendants from punishment in 1992, he could hand out get-out-of-jail-free cards in the form of the pardon.