Jonathan Ernst / Reuters

As the partial shutdown of the federal government has stretched to 25 days, Democrats are mulling a possible lawsuit: If Donald Trump declares a national emergency and reappropriates funding for his proposed border wall from other departments, as he has suggested he might do, they would almost certainly challenge that action in court. “Look, an emergency cannot be whatever a president says an emergency is,” Jamie Raskin, a former law professor and representative from Maryland, told The Washington Post. If there’s a legal question about Trump’s next steps, he said, “we’re very happy to relocate it from the halls of Congress into the courts.”

And if Democrats decide they want to sue Trump over his border wall, they may have a novel option—courtesy of their Republican colleagues. The GOP’s 2014 lawsuit against then-President Barack Obama was the first time a district-court judge affirmed the right of the House of Representatives, as an institution, to sue a sitting president. In the midst of this impasse, that suit could serve as a model for Democrats, as Congress once again turns to the courts to help it get out of the work of governing.

[Read: The most remarkable thing about Trump’s proposed national emergency]

The current budget standoff could end in a few different ways, which would determine the future of any potential lawsuits. Congress could make a deal with Trump, pass a budget, and get his signature on the legislation. Congress could also pass a budget without Trump, but then it would have to override his veto, which would require the unlikely cooperation of Senate Republicans. As long as Congress is still trying to work out a deal, courts have little role to play: “They can’t just say, ‘Hey, open the government!’” said Susan Bloch, a law professor at Georgetown University.

Alternatively, Trump could follow through on a suggestion he has been publicly toying with for several weeks: He could declare the alleged crisis at the border a national emergency and use that as a premise to direct money from existing budgets to the wall. This is the scenario in which a lawsuit by House Democrats would become relevant: They could claim the president was violating the House’s authority to make appropriations under Article I of the Constitution.

This kind of move does not have much precedent. “Courts are loath to be pulled into these types of political standoffs,” said Jonathan Turley, a law professor at George Washington University. “You have two parties who are playing a rather dangerous game of chicken.” In 2014, however, with Turley’s help, the GOP-held House of Representatives sued Obama for using government money to subsidize health-care costs under the Affordable Care Act without an appropriation from Congress. Obama, Republicans argued, had violated the House’s rights under Article I.

In theory, judges try to avoid situations where they appear to be refereeing partisan fights, and no fight could be more bitter than one in which members of one branch of the federal government sue the head of another. Despite this norm of reluctance, a district-court judge sided with Republicans in House v. Burwell.

[Read: What the president could do if he declares a state of emergency]

The big question in the case was whether the House had standing, or the right to bring this case against the president. Rosemary Collyer, a D.C. district-court judge, said yes. Although the substance of the Obamacare case was eventually resolved through a settlement agreement, and Collyer’s decision wouldn’t be binding on future judges, it showed that legislators have a chance of success in suing the president—or, at least, in using a lawsuit to slow down the president. This is the most important question, said Saikrishna Prakash, a law professor at the University of Virginia: “If they sued, would they be able to get an injunction telling him not to spend the money?”

In effect, this would be a way of getting around the work of politics: Unable to negotiate a deal themselves, the Democrats would be looking to the courts to stop Trump. There’s a reason legal action looks attractive in a standoff such as this, said Prakash. “Of the three branches, the courts are held in highest esteem. Having a court say that you’re right or you’re wrong does seem to end the discussion,” he said. “It’s not uncommon for politicians to think the court’s job is to sort these things out.”

A bet on the courts is still risky. Democrats could easily get a judge less sympathetic to their case for standing, and they could very well lose on the merits of their argument. In recent weeks, a number of House Democrats have confidently told reporters and cable-TV anchors that Trump would be on shaky legal ground if he declared a national emergency, but that’s “just bravado,” Prakash said. “Most of them don’t know anything about these statutes … Even if they wrote it, probably what they mean is that some staff member put it together.”

[Read: When the House of Representatives can sue the president]

There’s risk for House Democrats in suing Trump: A failed suit could undermine the fragile legal theory that the House has standing to sue the president in certain cases. Democrats should use this tool, Turley said, only “as a matter of last resort.”

Lawsuits can seem serious and meaningful, even when they’re not. So for Democrats who have a vested interest in battling Trump by any means, a lawsuit could be an attractive path. “One way to think about litigation in this context is that it’s a continuation of politics by other means,” said Prakash. Ultimately, though, this proliferation of lawsuits could obscure the real problem behind the border-wall impasse: Congress has failed to do one of its main jobs, which is to pass a budget.

“It’s a dereliction of duty for the Senate leader, [Mitch McConnell,] to say, ‘I’m not going to put something to a vote unless I know the president agrees,’” said Bloch. “The process just doesn’t work if the Senate just takes its orders from the president. It’s supposed to be a check on the president, not subservient.”

Fundamentally, a lawsuit aimed at breaking the current impasse and reopening the government would signal a multilevel breakdown in the balance of powers. The executive branch is dictating the actions of the legislature. The legislative branch may look to the judiciary to solve its problems. For its part, however, the judiciary generally does not want any part of this.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.