US District Judge in Texas Reed O'Connor rules the Affordable Care Act is "invalid", a decision hailed by US President Trump and likely to be appealed to the Supreme Court.

A federal judge in Texas has ruled the Affordable Care Act, also known as Obamacare, "invalid" on the eve of the sign-up deadline for coverage next year.

In a 55-page opinion, US District Judge Reed O'Connor ruled on Friday that last year's tax cut bill knocked the constitutional foundation from under Obamacare by eliminating a penalty for not having coverage.

Supporters of the law immediately said they would appeal.

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

"Once again, the president calls on Congress to replace Obamacare and act to protect people with preexisting conditions and provide Americans with quality affordable healthcare," White House spokeswoman Sarah Sanders said in a statement.

Wow, but not surprisingly, ObamaCare was just ruled UNCONSTITUTIONAL by a highly respected judge in Texas. Great news for America!

After Trump ordered the Justice Department to stop defending the health law, a coalition of ACA-supporting states took up the defence.

O'Connor is a conservative Republican appointee who previously blocked other Obama-era policies.

In June, the Justice Department declared the healthcare law's "individual mandate" unconstitutional in federal court. The decision was a break with a long-standing executive branch practice of defending existing statutes in court.

A year ago, Trump signed a $1.5 trillion tax bill that included a provision eliminating the individual mandate.

About 11.8 million consumers nationwide enrolled in 2018 Obamacare exchange plans, according to the US government's Centers for Medicare and Medicaid Services.