A highly respected career lawyer at the Justice Department has decided to resign just days after the Trump administration backed a controversial lawsuit that would wreck part of the Affordable Care Act.

Joel McElvain, outgoing assistant director of the federal programs branch, has spent more than 20 years at the department, much of it working on the biggest cases of the day. A former colleague described McElvain to HuffPost as a “really good guy — the type who in any rational or just world would be at DOJ his entire career.”

Another former colleague told The Washington Post, which was first to report the resignation, that the news of McElvain’s departure was a “gut punch.”

Although McElvain has not publicly offered a reason for his resignation, the Post article said that his departure “highlights internal frustration” with the Trump administration’sdecision to support a lawsuit from officials in 20 conservative states. That lawsuit, now before a federal district judge in Texas, could wipe out key protections for people with pre-existing conditions.

Insurers could go back to screening customers for health status, as they did before the health care law took effect, charging higher premiums or denying coverage altogether to people who have histories of cancer, diabetes or even plain old allergies.

The defendant in the case is the U.S. government, because the Affordable Care Act is a federal law. Customarily, the Justice Department would file a brief arguing why the states are wrong, since it is part of the executive branch and defending federal statutes in court is part of the executive’s constitutional duty to “take care that the laws be faithfully executed.”

But Thursday, at the filing deadline for the case, the Justice Department submitted a brief that sided with the states.

The brief was entirely consistent with President Donald Trump’s long-standing hostility to the law, which President Barack Obama signed in 2010. Trump and his Republican allies in Congress spent much of last year trying to repeal it.

That effort did not succeed, but as part of their 2017 tax cut, Republicans managed to zero out the law’s individual mandate, which encourages healthy people to sign up for insurance by hitting them with a financial penalty if they don’t. The Trump administration has also taken a series of executive actions, such as slashing the Affordable Care Act’s advertising budget, that have depressed enrollment or otherwise undermined it.

But none of that would compare to knocking out the protections for people with pre-existing conditions, as this new lawsuit could do.

In fact, as Margot Sanger-Katz of The New York Times pointed out on Tuesday, eliminating coverage requirements for the pre-existing conditions could have all sorts of far-reaching effects, making it difficult, or perhaps even impossible, for the federal government to distribute tax credits that today help millions afford coverage.

The Trump administration is not the first to drop the defense of a federal law. But when past administrations have decided against defending a law, they have generally argued that a case raised highly important moral issues ― or was clearly unconstitutional.

This is what the Obama administration argued in 2011 when it declined to defend the Defense of Marriage Act (DOMA), which denied federal benefits to same-sex couples. The decision was controversial, with even some of the administration’s own lawyers cautioning that it set a bad precedent.

But some experts supported the decision and, just two years later, the Supreme Court would invalidate DOMA as unconstitutional.

It’s hard to find a respected legal expert today who finds merit in this latest lawsuit. The basis for the states’ argument is that Congress originally intended for the pre-existing conditions protections to operate alongside the mandate; if the mandate is gone, the lawsuit reasons, then the pre-existing protections should go too.

The problem with this argument is that Congress last year made a clear decision to keep the protections but toss the mandate. The lawsuit essentially argues that this more recent action doesn’t matter.

Legal reasoning is always subjective, but even lawyers who enthusiastically supported other lawsuits challenging the Affordable Care Act’s constitutionality have dismissed the case as nonsense.

And it appears that some of the Justice Department’s own career lawyers feel the same way. Right before the Trump administration filed its brief, siding with the conservative states, three career lawyers who were supposed to file it withdrew their names from the case, offering an early hint that something was amiss.

Three political appointees at Justice, along with one other career lawyer, ended up signing onto the federal government’s brief. In court, they will square off against lawyers from states more supportive of the law and who have agreed to defend it.

McElvain was one of those career Justice lawyers who withdrew from the case. And now he has decided to leave the department entirely.

He has not said publicly why he is leaving, and he has not responded to emails from media outlets, including HuffPost, which tried to contact him last week. But the circumstances and timing could indicate it is connected with the Affordable Care Act lawsuit.

The Trump administration’s decision and, now, McElvain’s departure have some experts worried about the future of the Justice Department, which historically has tried to insulate these sort of legal functions from partisanship and political meddling from above.

“Joel is a civil servant through and through ― principled, dedicated to his country and nonpartisan,” Nicholas Bagley, who served at Justice from 2007 to 2010 and is now at the University of Michigan, told HuffPost. “If people like him are jumping ship, it’s a troubling sign of institutional rot at the Justice Department.”