President Biden’s administration told the Supreme Court on Wednesday that his predecessor had been wrong to argue that the Affordable Care Act was unconstitutional and urged the court to uphold the health-care law.

A top Justice Department lawyer, in a letter to the court, reversed the government’s position in a case argued last November and in which a decision has not been announced. While it is rare for the government to switch its position in a case, this change was expected, and this case could be the first of several before the high court in which Biden’s administration separates itself from positions held by former president Donald Trump.

Just as Trump vowed to demolish Obamacare, as former president Barack Obama’s signature domestic achievement is known, Biden, who was Obama’s vice president, promised during the 2020 campaign to strengthen and build on the health-care law.

The court is considering a case brought by Republican-led states and endorsed by the Trump administration.

The issue is whether a 2017 decision by Congress to remove Obamacare’s penalty for not buying health insurance — what is called the individual mandate — meant that the requirement to purchase health insurance was itself unconstitutional. In 2012, the Supreme Court said the penalty was key to the law’s constitutionality and was a legitimate use of Congress’s taxing power.

The Trump administration argued that the elimination of the penalty made the mandate to purchase health insurance unconstitutional, and that the entire law, including such popular provisions as keeping young adults on their parents’ insurance policies and ensuring coverage for those with preexisting medical conditions, should fall.

But in the letter, Deputy Solicitor General Edwin S. Kneedler, a career department lawyer, said the government “no longer adheres” to that position.

“Rather than imposing a new burden on covered individuals, the 2017 amendment preserved the choice between lawful options and simply eliminated any financial or negative legal consequence from choosing not to enroll in health coverage,” Kneedler wrote.

Moreover, he said, even if the requirement to purchase health insurance is now questionable, the Supreme Court should stick to its usual course of action and retain as much of the rest of the Affordable Care Act as possible.

In this case, Kneedler noted, the same Congress that in 2017 reduced to zero the penalty for not securing insurance “simultaneously left in place the remainder of the ACA.”

It is unclear how much influence the government’s change might have on the court.

The arguments of the Republican states, led by Texas, and the Trump administration received a skeptical reception when the justices heard the case Nov. 10.

The court has a 6 to 3 conservative majority, but two of those on the right, Chief Justice John G. Roberts Jr. and Justice Brett M. Kavanaugh, said plainly during oral arguments that they doubted Congress’s actions indicated a desire for the entire law to fall.

When the Trump administration declined to defend the law, courts allowed Democratic-led states such as California and lawyers for the House of Representatives to step in. Kneedler said that because the Biden administration’s view of the case had been adequately advanced by those parties, there was no need for additional briefing.

It is likely that the court already has decided the outcome — justices usually vote within days of oral arguments — and that an opinion is being written.