Affordable Care Act supporters hold up signs outside the Supreme Court as they wait for the court's decision on Obamacare on Thursday, June 25, 2015.

The Trump Justice Department, going further than it had before, said it supports a federal judge's ruling that President Barack Obama's signature health-care law, the Affordable Care Act, is unconstitutional, according to a court filing.

Amid mounting Democratic criticism of the administration's stance, President Donald Trump asserted in a tweet Tuesday afternoon that, "The Republican Party will become 'The Party of Healthcare!'"

Trump TWEET

The department filed its determination on Monday in the U.S. Court of Appeals for the 5th Circuit in New Orleans, where an appeal of U.S. District Judge Reed O'Connor's December opinion on the law is pending.

"The Department of Justice has determined that the district court's judgment should be affirmed," three DOJ lawyers wrote in the one-page filing in the 5th Circuit court.

Justice Department spokeswoman Kerri Kupec told CNBC: "The Department of Justice has determined that the district court's comprehensive opinion came to the correct conclusion and will support it on appeal."

If courts dismantle the ACA, it would likely cause millions of consumers to lose health care or face higher costs, in no small part due to the end of Medicaid expansion. Ending Obamacare is a long held goal of Trump and fellow Republicans. They failed to accomplish doing so in 2017 when the Senate fell short of passing a repeal bill.

Scrapping the law without a replacement would lead to 32 million more uninsured people by 2026, the Congressional Budget Office estimated in 2017.

O'Connor had ruled that the entirety of the Affordable Care Act became unconstitutional following Republicans' move in 2017 to eliminate the individual mandate penalty. Consumers who chose to opt out of buying insurance under Obamacare had been subject to a tax penalty.

O'Connor ruled that without an individual mandate, the health-care law could not stand on its own.

The move Monday comes as the Democratic-held House has pledged to strengthen the Affordable Care Act following the GOP's efforts to repeal it and the Trump administration's regulatory changes that weakened the law. On Wednesday, House Democrats plan to introduce legislation that aims to decrease costs for consumers and shore up Obamacare.

On Monday night, House Speaker Nancy Pelosi tweeted that the Trump administration "declared all out war on affordable, dependable health care" by backing the lawsuit.

Pelosi TWEET

Democrats made the Texas lawsuit, and some GOP lawmakers' support for it, a central issue in last year's midterm elections. The Trump administration's full support for the legal challenges to Obamacare opens a political vulnerability ahead of Trump's 2020 re-election bid.

Republicans lost 40 House seats, and a majority in the chamber, in November's elections.

Democratic presidential contenders, many of whom have made health care a central focus as the 2020 presidential primary season approaches, were quick to weigh in on the Trump administration's position.

"Trump and his administration are trying to take health care away from tens of millions of Americans — again," Sen. Kamala Harris, D-Calif., said in a tweet. "We must fight back again with everything we've got."

Harris TWEET

Minnesota Sen. Amy Klobuchar, who announced her White House bid in February, vowed to fight the administration's stance.

Klobuchar TWEET