Supporters of the law immediately said they would appeal. ‘‘Today’s misguided ruling will not deter us: our coalition will continue to fight in court for the health and wellbeing of all Americans,’’ said California Attorney General Xavier Becerra, who is leading a coalition of states defending the ACA.

In a 55-page opinion, US District Judge Reed O'Connor ruled that last year’s tax cut bill knocked the constitutional foundation from under ‘‘Obamacare’’ by eliminating a penalty for not having coverage. The rest of the law cannot be separated from that provision and is therefore invalid, he wrote.

WASHINGTON — A conservative federal judge in Texas on Friday ruled the Affordable Care Act ‘‘invalid’’ on the eve of the sign-up deadline for next year. But with appeals certain, even the Trump White House said the law will remain in place for now.


FROM THE ARCHIVES: Stable premiums, more options as 2019 signups begin

The White House applauded O'Connor’s ruling, but said the law remains in place while appeals proceed. President Trump tweeted that Congress should pass a new law.

‘‘As I predicted all along, Obamacare has been struck down as an UNCONSTITUTIONAL disaster!’’ Trump tweeted. ‘‘Now Congress must pass a STRONG law that provides GREAT healthcare and protects pre-existing conditions.’’

However, Congress is unlikely to act while the case remains in the courts. Numerous high-ranking Republican lawmakers have said they did not intend to also strike down popular provisions such as protection for people with preexisting medical conditions when they repealed the ACA’s fines for people who can afford coverage but remain uninsured.

Still, Democrat Nancy Pelosi, who is expected to become House speaker in January, vowed to fight what she called an ‘‘absurd ruling.’’ She said the House ‘‘will move swiftly to formally intervene in the appeals process to uphold the life-saving protections for people with pre-existing conditions and reject Republicans’ effort to destroy the Affordable Care Act.’’


White House press secretary Sarah Huckabee Sanders said: ‘‘We expect this ruling will be appealed to the Supreme Court. Pending the appeal process, the law remains in place.’’

Legal expert Timothy Jost, a supporter of the health law, said O'Connor’s ruling would have repercussions for nearly all Americans if it stands. If the entire health law is invalidated, popular provisions that benefit Medicare beneficiaries and people with employer coverage would also be scrapped. That could include the section that allows parents to keep young adult children on their coverage until age 26.

About 20 million people have gained health insurance coverage since the ACA passed in 2010 without a single Republican vote. Currently, about 10 million have subsidized private insurance through the health law’s insurance markets, while an estimated 12 million low-income people are covered through its Medicaid expansion.

Saturday is the sign-up deadline for 2019 private plans through HealthCare.gov. Meanwhile, a number of states are expected to move forward with Medicaid expansion after Democratic victories in the midterm elections.

If the case were to reach the Supreme Court it would mark the third time the justices consider a challenge to fundamental provisions of the law. ‘‘Obamacare’’ opponents lost both the first two cases.

The five justices who upheld the health law in 2012 in the first major case — Chief Justice John Roberts and the court’s four liberals — are all still serving.


FROM THE ARCHIVES: New insurance guidelines would undermine rules of the Affordable Care Act

Since then public opinion on the ACA has shifted from mostly negative to generally favorable.

Preserving the law’s protections for people with pre-existing medical conditions proved to be a strong argument for Democrats in the midterm elections. Republicans who tried to undermine those safeguards during their failed effort to repeal the health law last year were forced on the defensive and went on record saying they, too, want to make sure people with health problems can get coverage.

Democrats set to take control of the House in January are talking about passing legislation that enshrines protections for pre-existing conditions. It’s unclear what form that would take, or if the Republican-majority Senate would go along and Trump would sign it.

The GOP-led states who brought the lawsuit asked O'Connor to toss out the entire law after Congress repealed the ‘‘individual mandate’’ penalty for going without coverage. The conservative judge had previously ruled against other Obama-era policies.

The Trump administration weighed in, saying the government would no longer defend some core components of the ACA, but that others could remain, including Medicaid expansion, subsidies for private insurance and health insurance markets.

Along with the requirement to have health insurance, the administration said the parts of the law that should go included:

■ The requirement that insurers must take all applicants for comprehensive coverage regardless of prior health history, including pre-existing conditions. That includes a prohibition on insurers writing policies that exclude a particular condition — for example, a recurrence of breast cancer.


■ The prohibition on insurers charging higher premiums to people with health problems.

The health insurance industry says doing away with consumer protections will destabilize a market that seems to be finding its footing, with modest premium increases and more plan choices next year.

The American Medical Association called O'Connor’s ruling an ‘‘unfortunate step backward for our health system that is contrary to overwhelming public sentiment to preserve pre-existing condition protections.’’