By Sheryl Gay Stolberg, Robert Pear and Abby Goodnough

New York Times News Service

WASHINGTON — The decision by a federal judge in Texas to strike down all of the Affordable Care Act has thrust the volatile debate over health care onto center stage in a newly divided capital, imperiling the insurance coverage of millions of Americans while delivering a possible policy opening to Democrats.

After campaigning on a pledge to protect patients with pre-existing medical conditions — a promise that helped return them to the House majority they had lost in 2010 — Democrats vowed to move swiftly to defend the law and to safeguard its protections.

On the defensive, Republicans campaigning this fall promised that they too backed the health law’s protections for people with pre-existing medical conditions. But the Texas ruling illustrated the fruits — and possible perils — of their long-running campaign, stepped up in the Trump era, to remake the judiciary through the confirmation of dozens of conservative judges, including two appointees to the Supreme Court.

The ruling, if it stands, would not only do away with coverage protections for people with pre-­existing health conditions but also strike down the guarantee of coverage for what the law deems “essential health benefits.”

These include emergency services, maternity and newborn care, mental health and substance abuse treatment, prescription drugs and pediatric care.

But it is so sweeping that many legal analysts believe it is likely to be overturned. The Supreme Court, in a 5-4 decision, has already upheld the Affordable Care Act’s legality. The political reaction to the Texas decision is not likely to diminish anytime soon.

“This is a five-alarm fire,” said Sen. Chris Murphy, D-Conn. “Republicans just blew up our health care system.”

Top Republicans were by and large muted in their response, but incoming House Minority Leader Kevin McCarthy of California appealed to Democrats to come to negotiate a successor to what he called “an unconstitutional law.”

“President Trump has made clear he wants a solution, and I am committed to working with my colleagues on both sides of the aisle to make sure America’s health care system works for all Americans,” he said in a statement Saturday.

The Democrats’ first step will be in the courts; aides to current House Minority Leader Nancy Pelosi of California said Saturday that House Democrats would move quickly to notify the Trump administration they intend to intervene in the case. A vote on a resolution to do so is expected in the earliest days of the new Congress.

Democrats intend to convene hearings to spotlight the sweeping impact of the Texas ruling — and lay the groundwork for their case to reclaim the White House in 2020. If upheld on appeal, the decision could deprive an estimated 17 million Americans of their health insurance — including millions who gained coverage through the law’s expansion of Medicaid. Still others could see premiums skyrocket as price protections for pre-­existing conditions lapse.

The immediate practical effect of the ruling was not clear. While the judge declared that the whole law was invalid, as Texas and 19 other states had asserted, he did not issue an injunction to stop federal officials from enforcing it, and the effects of the judgment could be delayed pending appeals.

But the timing of the decision seemed designed to maximize political reverberations. It came a day before open enrollment was to end for coverage under the health law for the coming year. Sign-ups were already expected to dip after successive blows to the law by Congress and the Trump administration. But the passage of statewide referendums in November and the election of Democratic governors could also mean coverage expansions in the coming year under the health law’s Medicaid expansion.

In an email to Americans on Saturday, the Trump administration tried to allay concerns caused by the court decision in the Texas case.

The case is “stil moving through the courts,” said the message from the federal Centers for Medicare and Medicaid Services. “The marketplaces are open for business, and we will continue with open enrollment. There will be no impact to enrollees’ coverage or their coverage in a 2019 plan.”

But President Donald Trump was in a celebratory mood. “It was a big, big victory by a highly respected judge, highly, highly respected in Texas, and on the assumption that the Supreme Court upholds, we will get great, great health care for our people,” Trump told reporters Saturday. “We’ll have to sit down with the Democrats to do it, but I’m sure they want to do it also.”

In his ruling Friday, Judge Reed O’Connor of the U.S. District Court in Fort Worth struck down the law on the grounds that its mandate requiring people to buy health insurance is unconstitutional and the rest of the law cannot stand without it. The judge found that the “myriad parts” of the law are all interconnected. Without the mandate, he said, the rest of the law comes crashing down.

The ruling is just the latest chapter in the tumultuous history of a law that has transformed life for millions of Americans since the measure was passed without any Republican votes and signed in March 2010 by President Barack Obama.

The decision puts Republicans in Congress into a political box. Most of them tried over and over to repeal the Affordable Care Act. And many of them survived the Democratic wave in November’s midterm elections only by vowing to preserve the law’s protections for people with pre-existing conditions — protections that would be swept aside by O’Connor.

“Republicans in office would mostly prefer to run away from this issue or hope it disappears before they have to deal with it legislatively,” said Thomas Miller, a lawyer and health economist at the American Enterprise Institute and a critic of the law.