For weeks, President Trump has toyed with the idea of invoking emergency authority to build the southern border wall. Despite Senate Republicans’ warnings against an emergency declaration, once again, Trump made a case for one during Tuesday’s State of the Union address, calling the situation at the U.S.-Mexico border “an urgent national crisis.”

In 1976, Congress passed the National Emergencies Act, which gave the president the right to pronounce a national emergency on a whim. The act offers no definition of “emergency” and gives the president access to dozens of laws with specialized funds. Although none automatically allocate additional money to the president during a national emergency, legal experts have pointed to two emergency powers that could shift Defense Department funding.

If Trump follows through with a declaration, it will undoubtedly and swiftly be challenged in the courts.

Private landowners whose property is seized under the rule of eminent domain would have standing to file suit. States that were expecting diverted funds could sue, if they can show sufficient injury. Attorneys from environmental and civil rights groups have also made known their intentions to sue.

From Twitter to campaign speeches, Trump has provided plenty of ammunition for potential litigants. Few if any presidents have made so many unguarded and ill-informed statements, and Trump’s have been used quite effectively against his administration and his own policies. Dozens of important policy decisions have been blocked by judges just in the first two years.

Here, challengers may try to use Trump’s words to argue that what’s really motivating him is not an emergency at the border but a campaign promise to build a wall or a dissatisfaction with the legislative process.

Until Trump specifies with which emergency authority he plans to build the wall and which funds he will divert, attorneys for potential litigants can’t fully formulate their arguments. Still, it’s clear that attorneys on both sides will have a lengthy legal battle to prepare for.

The Defenders: ‘The unassailable position of the president’

Justice Department attorneys, working on behalf of the Trump administration, will be looking to prove that declaring a national emergency was within the scope of his presidential authority.

Although Trump has made it more difficult for the Justice Department, border security remains an area with the greatest deference afforded to the executive branch.

“Trump comes to court with what has historically been the unassailable position of the president,” said Jonathan Turley, constitutional law professor at George Washington University. “Courts are leery in challenging these types of emergency declaration, and they have a strict tradition of avoiding political or policy questions.”

The White House could not have done more to magnify the risk of Trump’s tweets by proclaiming early on that they were official statements by the president. It could have distinguished his tweets from official, executive policy but did not.

Trump’s missives do suggest the emergency power has been used as a bargaining chip, but Turley said that there’s nothing in the law that says a president can’t threaten to use the National Emergencies Act before actually using it. It also does not preclude Trump from making a legitimate emergency claim.

Moreover, the fact that Trump has made contradictory statements about the source or rationale of the funding may not be relevant to the court. The court’s focus must be narrower.

Experts have drawn parallels to the dynamic that played out with the legal challenges to Trump’s travel ban, which barred travelers from eight countries, six of them with Muslim majorities.

Plaintiffs introduced Trump’s tweets and campaign statements as evidence to show that his intent was to discriminate against Muslims, including his campaign pledge for a “total and complete shutdown of Muslims entering the United States until our country’s representatives can figure out what is going on.”

The U.S. Supreme Court, though it considered the statements relevant, ruled that the travel ban was “squarely within the scope of Presidential authority” and that the issue before it was “not whether to denounce the statements.”

Like the travel ban case, “courts are going to look at the National Emergencies Act itself and how Congress wrote it,” said Turley, adding that it doesn’t have the types of limitations people seem to be intimating. “Congress wrote an act which gave a president virtually unilateral authority to declare a national emergency.”

The Challengers: ‘A policy disagreement is not an emergency — it’s democracy’

Trump told reporters at the White House on Friday: “We will be looking at a national emergency because I don’t think anything’s going to happen. … I don’t think Democrats want border security.”

Groups and individuals challenging Trump’s declaration will argue that emergency powers were meant to be used during a national crisis, when Congress doesn’t have the time to act swiftly enough.

But, they will argue, Trump’s statements belie this principle.

“Trump’s actions are geared at a dissatisfaction with the process. A policy disagreement is not an emergency — it’s democracy,” said Dror Ladin, a lawyer with the American Civil Liberties Union National Security Project, which is among the agencies that indicated they will sue if Trump declares a national emergency.

Assuming these litigants can establish their standing to take Trump to court, judges will want to see some support for the claim that an emergency exists. They might or might not be satisfied with sweeping declarations about a “crisis” and claims about terrorism, drugs and crime that have already been proved false or misleading.

Those suing will also try to debunk Trump’s claim of emergency power as “bogus,” said Pat Gallagher, a top attorney at the Sierra Club, an environmental organization that has said it is likely to sue.

Elizabeth Goitein, co-director of the Liberty & National Security Program at law and public policy institute Brennan Center for Justice, said that courts will weigh the evidence that Congress intended the president to have these powers and for this particular purpose. In part, she said, they will consider Trump’s tweets and public statements.

“In a case where motive is relevant, the president may tweet something that is evidence of his intention. In this case, the president’s tweets are very much backed up by his actions,” she said. “The fact that there is a legislative appropriations process suggests that this isn’t an emergency but an effort to circumvent the authority of Congress.”

How will the court challenges turn out?

While courts are supposed to show deference to the president, particularly in matters of “national emergencies,” the challengers have a distinct advantage: They don’t actually need to prove anything to obtain a temporary order. They do not have to “win” the case to block construction of the wall.

In the end, though, a court will divide its review between narrowly considering what conditions were placed on the emergency authority and looking at whether Congress gave the president unchecked authority to declare an emergency and undesignated funds to use.

Even with the president’s statements, Congress did create a virtually unchecked authority for a president to declare a national emergency.

Turley said, “In the end, it’s what Congress has done, not what the president has done, that will be the court’s focus and determine the outcome of this challenge.”

Read more: