WASHINGTON — The Trump administration's decision to support a ruling by a Texas federal judge against Obamacare is drawing surprising criticism from conservatives, who are joining with liberal legal experts in attacking the government's new position.

President Donald Trump ordered the Justice Department last week to change course and sign on to the decision by U.S. District Court Judge Reed O'Connor, who late last year declared the entire Affordable Care Act unconstitutional. Administration officials say the president brushed aside objections from Attorney General William Barr in directing the change.

Responding to a lawsuit filed by Texas and 18 other states, O'Connor ruled that when Congress changed the health care law in 2017, it undercut the reasoning the Supreme Court relied on in upholding the law in 2012. In an opinion written by Chief Justice John Roberts, the Supreme Court said Obamacare's individual mandate — the provision requiring all Americans to buy health insurance or face a tax penalty — was unconstitutional. But it upheld the law as a legitimate exercise of Congress's power to impose taxes.

The Republicans controlling Congress struck back in 2017, dropping the tax penalty to zero. O'Connor then ruled that because there no longer was a tax, the law could not be saved as a use of the taxing power. And he further said that because the Affordable Care Act was a web of interlocking provisions, the entire law must fall.

O'Connor's ruling is on hold while supporters of the law take the case to the 5th Circuit Court of Appeals.

Last year, the Justice Department said it only partly agreed with O'Connor's ruling, saying then that the judge should have left some parts of the law in effect, including provisions expanding Medicaid to cover millions of America's poorest, creating health insurance marketplaces, and providing subsidies for low-and-moderate income people.

Now Trump has ordered the government to fully embrace the judge's decision, including the finding that the entire law must be struck down as unconstitutional. But many conservative legal scholars — including some of Obamacare's strongest critics — are attacking the judge's ruling as unsound.

Submitting a friend of court brief for himself and three others, Jonathan Adler, a law professor at Case Western Reserve University, said, "The four of us do not agree on much, particularly where the Affordable Care Act is concerned, but we all agree that the decision below is unmoored from law or contemporary doctrine."

They said that when some parts of a law become unenforceable and courts look at whether other parts can survive, the key question is whether Congress would have preferred to keep some parts of the law instead of junking the entire thing. In this case, they said, Congress affected only the tax penalty in the Affordable Care Act and left the rest of the law untouched. "Congressional intent is clear," their brief said. "A court's insistence on nonetheless substituting its own judgement for that of Congress usurps congressional power."

Attorneys General Dave Yost of Ohio and Timothy Fox of Montana, both Republicans, offered a similar argument in a separate legal filing. The repeal of the tax penalty "establishes that the law is capable of functioning without the mandate (it already does), and that Congress would have preferred such a law to no law at all."

A different attack on the law comes from former federal appeals court judge Michael McConnell, a conservative law professor at Stanford, and two other legal scholars. They said the judge exceeded his powers when he ordered the government to stop enforcing the entire law. Injunctions work against officials, not laws, they said. "Because the government cannot collect a tax of zero from anyone, there is no basis for a federal court to enjoin" the act of any government official, they said.

The appeals court has not yet scheduled oral argument.