Open this photo in gallery:

U.S. President Donald Trump holds a signed executive order on 'Zero-Based Regulatory Budgeting To Unleash American Energy', in the Oval Office at the White House in Washington, D.C., on April 9.Nathan Howard/Reuters

Donald Trump has called the courts of the United States “out of control.” He has lashed out at individual judges, calling one a “troublemaker and agitator,” a “grandstander” and “inept.” His administration has toyed with outright refusing court orders, saying it cannot return a migrant mistakenly sent to El Salvador – and, earlier, arguing that deportation flights could not be turned back in time to comply with a judge’s ruling.

The possibility of a president refusing to abide by the dictates of a court has raised the spectre of a looming constitutional crisis in the world’s pre-eminent democracy – the kind of crisis that has historically produced bloodshed.

“The civil war was a constitutional crisis,” said Gerard Magliocca, a scholar at Indiana University who has written extensively on constitutional law. When a society can no longer expect justice, he adds, they “resort to violence. Man the barricades.”

“We are,” he hopes, “a long way from that.”

Ultimately, he believes, the White House will discover a need for the courts it is currently resisting.

But the U.S. stands at a perilous juncture.

The Trump White House “is following a path that will organize the courts in America and the justice system so that he has pretty much full control over anything that happens,” warned Jim Jones, a former chief justice of the Idaho Supreme Court.

Mr. Trump has returned to power determined to test the bounds of executive power, issuing dozens of orders that have shaken the economic foundations of the country, reshaped its federal bureaucracy and commanded national compliance to social dictates.

Whether he will listen to the courts if they tell him he has overstepped is a matter of profound importance, not just for the U.S. Among the cases expected to come before the Supreme Court are several challenging Mr. Trump’s authority to impose some of the tariffs he has placed on trade with Canada.

The Trump White House “has at the very least been playing fast and loose with court orders and trying to circumvent them,” said Ilya Somin, a professor of law at Virginia’s George Mason University who is also a chair of constitutional studies with the libertarian Cato Institute.

This week, a federal judge warned he could hold the Trump administration in contempt over its failure to halt deportation flights last month. A U.S. Court of Appeals judge also wrote forcefully to condemn the administration’s response to the wrongful deportation of Kilmar Abrego Garcia, a migrant Mr. Trump accuses of being a part of the MS-13 transnational criminal gang. Mr. Abrego Garcia was sent to a prison in El Salvador in March.

“The government is asserting a right to stash away residents of the country in foreign prisons without the semblance of due process that is the foundation of our constitutional order,” the judge wrote.

Harvard economist sees parallels between Trump, Zedong and Castro

“This should be shocking not only to judges, but to the intuitive sense of liberty that Americans far removed from courthouses still hold dear.”

The judicial warnings are set against broader unease with Mr. Trump’s actions.

Lawrence Wasden, who was for two decades Idaho’s attorney general, was shocked at a February social-media post from the White House that depicted Mr. Trump in a crown with the caption: “LONG LIVE THE KING.”

“That’s pretty disturbing,” he said.

But he faults more than Mr. Trump. Democratic presidents, too, have believed “that they can rule by executive order – and sometimes just by presidential fiat.”

With Mr. Trump, he believes what matters most is how strongly courts respond. “The real question is what’s going to happen over the next six months to a year,” he said. “That’s the critical time.”

It’s not the first time a U.S. president has bucked the courts. In the 1830s, Andrew Jackson refused to enforce a Supreme Court decision that gave considerable rights to the Cherokee Nation. Mr. Jackson at the time called the ruling “stillborn.”

The U.S. system of government survived that incident, but the consequences were real.

“It was the demise of the Cherokee Nation. They got removed. And 8,000 people died,” said Matthew Sundquist, a former writer for Supreme Court news site SCOTUSblog who wrote an academic paper on the incident.

Nearly two centuries later, another U.S. president is questioning court decisions about people outside of mainstream society.

It is a worrisome echo of history, Mr. Sundquist said.

If the White House succeeds in removing migrants en masse, “to me the thing it leaves the door open to is Trump being able to send his domestic political enemies who are U.S. citizens to El Salvador to put them in prison,” he said.

Still, others remain confident that courts will hold their own.

Mr. Jones, the former Idaho justice, said Mr. Trump “is moving too fast, too brashly and too openly to implement an autocratic system. I think we may have it so deeply ingrained in our DNA to have democracy prevail that he may be unsuccessful.”

More importantly, core elements of Mr. Trump’s agenda rely on backing from the courts, argues Prof. Magliocca.

If a judge agrees to such an injunction, for the administration to be in open contravention of the court “wrecks their whole bargaining position,” he said.

“Once they realize that they’re going to need the Supreme Court’s help to try to get the tariffs unfrozen,” he predicts, “then Mr. [Abrego] Garcia is going to magically reappear.”

Editor’s note: This article has been updated to correct a quote misattributed to Ilya Somin. The quote is now correctly attributed to Gerard Magliocca.

Follow related authors and topics

Authors and topics you follow will be added to your personal news feed in Following.

Interact with The Globe