A legal fight over the acting secretary of veterans affairs could have big ramifications for Donald Trump — or any president who wants to replace a fired Cabinet member.

The Department of Veterans Affairs has been without a permanent secretary for more than a month, and Trump has yet to pick a new nominee after Dr. Ronny L. Jackson withdrew his nomination amid a brewing scandal about his prescribing habits and conduct as head of the White House medical unit.

Robert Wilkie, formerly a Department of Defense undersecretary, is serving as acting VA secretary. Trump picked him for the role after ousting David Shulkin in March. But a government watchdog group is challenging Wilkie’s appointment as illegal.

The question of whether the president can fire an executive branch official and pick a person to fill that position in an “acting” role is a surprisingly unsettled matter — one with ramifications beyond the Veterans Affairs Department.

Trump could attempt to clean house in other federal agencies because of personal or political motives. “I’m really at a point where we’re getting very close to the Cabinet and other things that I want,” Trump said in March. This lawsuit, however, will test the limits of Trump’s power to appoint acting officials across the executive branch.

The suit claims Trump’s appointment of an acting secretary is unlawful

Democracy Forward, an executive branch watchdog group, filed a lawsuit on behalf of veterans claiming Trump violated federal law by appointing Wilkie to the position of acting VA secretary rather than Thomas Bowman, the VA deputy secretary, who is next in line at the agency. The group is suggesting Trump bypassed Bowman to push an agenda of health care privatization on the VA, and Wilkie would be a more pliable pick to help the administration carry out this agenda.

The merits of privatization aren’t at issue in this case, only whether Wilkie or Bowman should be in charge temporarily. Wilkie’s appointment is illegal, the plaintiffs are arguing, because Shulkin was fired by the president, and, as a result, Trump can’t rely on the Federal Vacancies Reform Act of 1998 to fill the opening.

The statute permits a president to appoint a temporary replacement when an officer “dies, resigns, or is otherwise unable to perform the functions and duties of the office.” It doesn’t explicitly say anything about what happens if the officer is fired.

John Lewis, a lawyer for Democracy Forward, said now that Jackson’s nomination has fallen apart it’s clear Wilkie will be in charge for at least a few months. “So we think it’s important now to get a clear answer as to the question of who is the rightful acting secretary of the VA,” he said.

What is the Federal Vacancies Reform Act of 1998, and how does it work?

The big question in this lawsuit is whether the Federal Vacancies Reform Act of 1998 (FVRA) can be applied to officials who’ve been fired by the president. The FVRA, generally speaking, governs who can serve, and for how long, when vacancies open up in many Senate-confirmed positions within any presidential administration.

The Vacancies Act is basically a compromise between the president and the Senate, Anne Joseph O’Connell, a law professor at Berkeley, previously explained to Vox. The law grants the president the ability to choose his personnel and keep the executive branch running when jobs open up but imposes guidelines on who can step in when a vacancy arises and imposes deadlines on that length of service, which allows the Senate retain its conformation prerogative under the appointments clause of the Constitution.

The Federal Vacancies Reform Act defines who can fulfill the duties of an “acting” official. The first category is for “first assistants.” In most cases, this is the person one notch below the job that just opened up. In the Department of Veterans Affairs, this would be the Deputy VA Secretary Thomas Bowman.

But the president has other options. He can pick an individual who’s Senate-confirmed but working in a different agency. This is what Trump did when he named Robert Wilkie, a defense undersecretary confirmed by the Senate. Trump also pulled this move with Mick Mulvaney, his director of the Office of Management and Budget, when he selected him to head up the Consumer Financial Protection Bureau after its chief officer resigned.

Finally, Trump could choose an “acting” from the category of what’s called a “senior careerist,” a class of high-level government bureaucrats employed by a given agency for at least 90 days.

There are limits to how long someone can act as an “acting.” The deadline is 210 days or until a permanent replacement is nominated and confirmed, though the clock can restart if, for example. the nomination is returned by the Senate. But a lot can happen in that time period, and acting officers are empowered to do the same job as Senate-confirmed officials — which is why vacancy appointments matter.

The debate over whether the Federal Vacancies Reform Act applies for fired officials

Shulkin told CNN that he got a warning call from Chief of Staff John Kelly but discovered he was out of a job mostly courtesy of a tweet from Trump. The White House said Shulkin resigned. Shulkin disputes that, and his outspokenness after his departure at least suggests he did not leave willingly.

If Shulkin’s account is correct — that Trump fired him — this lawsuit argues that Trump can’t use the Federal Vacancies Reform Act to appoint an acting secretary because it only kicks in if an officer “dies, resigns, or is otherwise unable to perform the functions and duties of the office.”

Noticeably absent is the word “fired.” This is the crux of Democracy Forward’s suit.

“It doesn’t make any mention of firing the official, or removing the official, so the only way you can reach the conclusion is by shoehorning it into the language of ‘unable to serve,’” Lewis, the Democracy Forward lawyer, told Vox. “But somebody who’s fired is able to serve. They’re able and willing to continue serving in the position.

“So the reason that’s important is Shulkin didn’t die, he didn’t resign, and he wasn’t unable to serve,” Lewis added. “The president fired him by tweet, and under those circumstances the FVRA simply didn’t give the power to appoint Robert Wilkie as an acting official.”

Bowman, the deputy secretary and No. 2 at the department, should have become the acting secretary, the lawsuit argues, and Trump’s decision to name Wilkie to the job overstepped his authority.

“I think there’s a nonfrivolous argument that the omission of ‘is fired’ or ‘is removed from office’ is actually a meaningful omission,” Stephen Vladeck, a law professor at the University of Texas, told Vox in a March interview about the debate over whether the FVRA applies to vacancies that open up because of firings.

Vladeck’s argument is twofold. First, other federal statutes do address termination, bolstering the argument that Congress left firings out of the FVRA on purpose.

The second revolves around executive power. The FVRA gives the president a lot of flexibility in whom he can appoint in an acting capacity. “It’s not exactly difficult to imagine that Congress might have been concerned about giving the president that power when the vacancy only existed because of the president’s unilateral action to fire the officer,” Vladeck said. In other words, Congress would want to guard against a reckless president who kept firing Cabinet secretaries he didn’t like or who wouldn’t do his bidding.

Vladeck isn’t saying that the Federal Vacancies Reform Act definitely doesn’t apply in cases where people are terminated, but he also doesn’t think it’s “as open and shut as I think the lawyers in the executive branch tend to think.”

Lawyers for the executive branch have said in the past that the Vacancies Act does apply when someone gets fired. The Justice Department’s Office of Legal Counsel determined that getting fired falls under that “is otherwise unable to perform the functions and duties of the office” catchall.

Lawyers based their reasoning on Senate floor debate over the bill, in which lawmakers used the example of being fired as a reason someone might be “unable to perform the functions and duties of the office.”

O’Connell said, also during a March interview, that lawmakers likely took terminations into consideration when making the law. “I believe if you just look back in modern administrations — and even prior to modern, historical administrations — resignation is often forced,” she said. “Though it’s not explicit in the statute, that Congress, in enacting the Vacancies Act, understood that resignations are sometimes forced and the Vacancies Act would kick in.”

O’Connell agrees that the notion a president could attempt to fire people and replace them with others he prefers in the short term raises real concerns about the abuse of power.

Yet she predicted that a president who deployed this strategy would face political consequences. “The president is not going to go around willy-nilly firing people to take advantage of being able to get someone closer to their preferences under the Vacancies Act in the position,” she said.

Does this lawsuit have a chance?

This lawsuit, and the issue it raises, takes on a greater urgency under Trump. Shulkin’s ouster was the fourth high-profile one in March, including another fired Cabinet member, Secretary of State Rex Tillerson.

This issue didn’t come to a head with Tillerson — the administration appointed the No. 2 official, Deputy Secretary John Sullivan, as acting secretary of state until Mike Pompeo’s confirmation — and it hasn’t really been settled in the two decades that Federal Vacancies Reform Act has been law.

Lewis said this question hasn’t been decided in part because past presidents haven’t fired officials in the same way Trump has. “And I think that really just speaks to how unusual this administration is,” he said.

The firing question doesn’t eliminate hurdles the lawsuit may face. For one, the suit alleges that veterans are facing uncertainty about their health care and services from the VA because of Wilkie’s appointment.

Predicting or assuming veterans are being harmed might create issues with standing. O’Connell told Vox in an email that the injury alleged seemed speculative. “To get past the courthouse door,” she wrote, “you need imminent and concrete harm.”

Lewis said that in Democracy Forward’s view, the standing issue comes down to the central notion that veterans have a relationship with the VA that’s different from other departments and their constituents. “The country owes certain obligations to veterans that the VA is charged with fulfilling,” he said. The uncertainty around the future of VA benefits — including health care — presents its own threat.

But if the lawsuit does move forward, it has implications for the entire executive branch. The succession question after a firing could reemerge if Trump decides to fire Attorney General Jeff Sessions, who has angered the president with his decision to recuse himself from the Russia investigation.

Deputy Attorney General Rod Rosenstein currently oversees the investigation and appointed special counsel Robert Mueller. But a new attorney general would not have to recuse himself or herself from that investigation, and Trump could Sessions and attempt to install an ally as acting attorney general who could quickly take over the Russia investigation, direct its course, or shut it down.

That’s all speculation, at least for now. But the Veterans Affairs Department lawsuit could go a long way to clarifying whether the law restrains Trump, or any president, in the firing and hiring process.