Speaker of the House Nancy Pelosi (D-CA) speaks to reporters outside the White House January 2, 2019.

The House of Representatives on Friday launched a legal effort to help defend Obamacare in a court case that is threatening to kill that landmark health-care reform law, which has led to the expansion of health insurance to millions of Americans.

The House, which as of Thursday is controlled by Democrats and led by Speaker Nancy Pelosi of California, asked a federal judge in Texas to allow it to intervene in the case.

If Judge Reed O'Connor grants that request, it would allow the House to make legal arguments in the dispute going forward, up to and including at the U.S. Supreme Court.

O'Connor on Dec. 14 ruled that Obamacare is unconstitutional in response to a lawsuit against the federal government by a group of Republican state attorneys general, led by Texas. O'Connor stayed his ruling pending appeal.

A lawyer for the House said in a filing in U.S. District Court for the Northern District of Texas that federal legal rules give "the House an unconditional right to intervene" in the case, given that Obamacare was passed into law by Congress, and given that the Trump administration is not defending the law.

President Donald Trump campaigned on repealing and replacing Obamacare. But his effort failed after three Republican senators, including the late John McCain of Arizona, voted against a repeal-and-replace measure in July 2017.

The House filing said that its "interest in this action ... is not adequately represented by the existing parties."

Pelosi on Friday noted that on Thursday "the new Democratic House took action to protect people with pre-existing conditions and all Americans' health care" by passing a resolution seeking to intervene in the lawsuit.

"The Affordable Care Act and all its life-saving protections are the law of the land," Pelosi said in a statement. "While the Administration refuses to meet its responsibilities to defend the laws, the House of Representatives is acting to uphold the constitutionality of this law and protect the health care of every American."

The move by the House is the latest in a long line of legislative and legal battles that began in 2010 after the then-Democratic-controlled Congress passed the Affordable Care Act and sent it for signing into law by then-President Barack Obama, himself a Democrat.

The plaintiffs in the current lawsuit claim the health-care law is no longer valid because of the previously GOP-held Congress' decision to eliminate the tax penalty for individuals who fail to have some form of health insurance coverage.

If O'Connor's ruling is upheld by a higher court, Obamacare's many provisions would be eliminated. Those provisions include prohibitions on insurers charging higher premiums or denying coverage for people with pre-existing health conditions.

Obamacare also offers subsidies that help low- and middle-income people afford health insurance and significantly funds the expansion of Medicaid coverage to people who previously were not eligible for that health coverage program.

On Thursday, 17 Democratic state attorneys general, who have already been fighting the lawsuit as so-called intervenor defendants, appealed O'Connor's ruling.

Because O'Connor had already stayed his ruling pending appeal, Americans who have signed up for Obamacare individual health plans or have Medicaid coverage under provisions of the law are not affected by his ruling in the case.

The case could end up being decided by the Supreme Court, which on two prior occasions has issued decisions that kept much of Obamacare intact.

The first of those decisions ruled that the individual mandate requiring most people to have health coverage or face a fine was a tax, and hence was constitutional. The current lawsuit claims that the zeroing out of that "tax" means that constitutional underpinning of the entire law is removed.

While that argument is widely disputed, even by long-standing critics of Obamacare, O'Connor endorsed it with his ruling.

The Justice Department, which traditionally defends federal law, is not fighting the lawsuit because of the Trump administration's hostility to the law.

However, the DOJ, in its filings in the lawsuit, did not endorse the claim that the entire law is invalid even if provisions related to the individual mandate are invalid.