A federal judge in Texas on Friday struck down the Affordable Care Act, throwing a new round of uncertainty into the fate of the law just one day before the deadline to sign up for coverage for next year.

U.S. District Court Judge Reed O'Connor ruled that the law's individual mandate is unconstitutional, and that because the mandate cannot be separated from the rest of the law, the rest of the law is also invalid.

ADVERTISEMENT

The ruling is certain to be appealed, and legal experts in both parties have said they ultimately expect the challenge to the health law will not succeed. ObamaCare will remain in effect while the case is appealed.

President Trump Donald John TrumpBiden on Trump's refusal to commit to peaceful transfer of power: 'What country are we in?' Romney: 'Unthinkable and unacceptable' to not commit to peaceful transition of power Two Louisville police officers shot amid Breonna Taylor grand jury protests MORE took to Twitter on Friday night to tout the judge's ruling while calling on congressional leaders to work on a new law, despite the chances of Congress passing a replacement law on which both parties can agree being essentially zero.

"Now Congress must pass a STRONG law that provides GREAT healthcare and protects pre-existing conditions. Mitch and Nancy, get it done!" Trump tweeted, referring to Senate Majority Leader Mitch McConnell Addison (Mitch) Mitchell McConnellFEC flags McConnell campaign over suspected accounting errors Poll: 59 percent think president elected in November should name next Supreme Court justice Mark Kelly: Arizona Senate race winner should be sworn in 'promptly' MORE (R-Ky.) and expected incoming House Speaker Nancy Pelosi Nancy PelosiHoyer: House should vote on COVID-19 aid — with or without a bipartisan deal Ruth Bader Ginsburg lies in repose at Supreme Court McCarthy threatens motion to oust Pelosi if she moves forward with impeachment MORE (D-Calif.).

O'Connor, an appointee of former President George W. Bush, acknowledged in his ruling that health care is a "politically charged affair — inflaming emotions and testing civility."

But he added courts "are not tasked with, nor are they suited to, policymaking." Instead, he said they must determine what the Constitution requires. In this, case O'Connor said the Constitution does not allow the mandate to stand.

The reasoning of the ruling states that in 2012, the Supreme Court upheld the mandate to have coverage because of Congress's power to tax. But, last year, Congress removed the fine for failing to comply with the mandate, which, he argues, means the mandate is no longer a tax and therefore is unconstitutional.

In a controversial move, the judge added that because the mandate is "essential" to the rest of the law, without the mandate, the entire law is invalid.

Legal experts in both parties have denounced that argument, saying it is obvious that Congress wanted the rest of the Affordable Care Act to remain when it repealed only the mandate penalty last year.

Democrats accused the judge of waiting until after the election to issue the ruling, saying he knew striking down the law before the election would harm Republicans.

The court case, brought by 20 GOP-led states, was at the center of this year's campaign after Democrats attacked Republicans for supporting the lawsuit and seeking to overturn ObamaCare's protections for pre-existing conditions.

The Trump administration, in a rare move, declined to defend the law in court and instead argued the pre-existing condition protections should be overturned.

Nicholas Bagley, a law professor at the University of Michigan, wrote on Twitter Friday night that he thinks the ruling does not prevent the Affordable Care Act from remaining in effect while the appeals process plays out, because there is no injunction from the court.

"Everyone should remain calm," he wrote.

“The ruling seems to be based on faulty legal reasoning and hopefully it will be overturned," he said. "Americans who care about working families must do all they can to prevent this district court ruling from becoming law.”

— Updated: 9:38 p.m.