The website is photographed in Washington, Dec. 15, 2017. A Justice Department litigator with more than 20 years of service submitted a letter of resignation on Friday, the morning after Attorney General Jeff Sessions informed Congress that the department would no longer defend the Affordable Care Act from lawsuits. Credit: Jon Elswick | AP

WASHINGTON — A senior career Justice Department official has resigned in the wake of the Trump administration’s move to stop defending a key provision of the Affordable Care Act, a departure that highlights internal frustration generated by the decision, according to people familiar with the matter.

Joel McElvain, who has worked at the Justice Department for more than 20 years, submitted his resignation letter Friday, the morning after Attorney General Jeff Sessions notified Congress that the agency will not defend the ACA — the 2010 law also known as Obamacare — against lawsuits brought by Republican-led states challenging its requirement that most Americans carry health insurance.

As a presidential candidate, Donald Trump campaigned on the promise of repealing Obamacare, but that effort faltered in Congress. Last year, lawmakers amended the law, nullifying the provision requiring people to carry insurance. That takes effect in 2019.

The Justice Department’s decision last week reversed years of legal work McElvain and the Justice Department had performed on the issue.

McElvain and his team were honored in 2013 with the attorney general’s award for exceptional service defending the legislation in court. A Justice Department spokeswoman confirmed his resignation takes effect in early July. McElvain declined to comment.

Those who know McElvain described him as an expert lawyer and a well-liked boss.

“This is the first I’m hearing it, and it’s a gut punch,” said one person who worked with McElvain for years and spoke on the condition of anonymity to discuss a sensitive personnel issue. “That will be a very big blow to the morale of the [agency’s] civil division, a really sad day for the Department of Justice and a loss for the country.”

Several colleagues said McElvain was in line to become director of the Justice Department’s federal programs branch, which handles complex government policy questions pending before the courts. It is not known for its politics but for the tenacity with which its lawyers defend the law — any law — passed by Congress.

“Joel is just phenomenal. He’s just such a terrific lawyer and a great person,” said one former Justice Department official who knows McElvain. “It’s a lot of institutional knowledge and a great deal of experience walking out the door.”

It was previously reported that shortly after the Justice Department reversed itself, McElvain and two other Justice Department lawyers who had been defending the ACA withdrew from a case pending in a Texas court.

Sessions told the court and Congress that the Justice Department adopted its position with Trump’s approval. While he acknowledged that the decision not to defend an existing law deviates from historical practice, Sessions said the move is not unprecedented.

“As you know, the executive branch has a long-standing tradition of defending the constitutionality of duly enacted statutes if reasonable arguments can be made in their defense,” Sessions wrote. “I have concluded that this is a rare case where the proper case is to forgo defense” of part of the ACA.

The move to stop defending the ACA does not immediately affect any of its provisions, but it puts the law on a weaker legal footing in the Texas case, which is being heard by a Republican-appointed judge who has in other recent cases ruled against more minor aspects.

Under the Affordable Care Act’s original terms, most individuals were required to pay a financial penalty each year if they failed to maintain minimal health care coverage. After the Republican-controlled Congress passed the Jobs Act last year, eliminating that penalty, 20 states and two individuals have brought a suit against the federal government claiming the law has become unconstitutional.

Washington Post writer Robert Barnes contributed to this report.

Follow the Bangor Daily News on Facebook for the latest Maine news.