FILE - Protesters gather across the Chicago River from Trump Tower to rally against the repeal of the Affordable Care Act, March 24, 2017, in Chicago.
FILE - Protesters gather across the Chicago River from Trump Tower to rally against the repeal of the Affordable Care Act, March 24, 2017, in Chicago.

A U.S. federal judge has ruled that the Affordable Care Act, widely known as Obamacare, is unconstitutional.

U.S. District Court Judge Reed O’Connor in Texas ruled Friday that a change in the U.S. tax law last year eliminating a penalty for not having health insurance invalidates the entire ACA.

Last year's $1.5 trillion tax bill included a provision eliminating the individual mandate.

FILE - The HealthCare.gov website on a computer sc
The HealthCare.gov website on a computer screen in New York, Oct. 23, 2018. A U.S. federal judge Friday ruled the Affordable Care Act unconstitutional.

The decision is expected to be appealed to the U.S. Supreme Court.

The ACA will remain the law during the appeal process.

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

U.S. President Donald Trump promised during his presidential campaign to dismantle the ACA, a program that made affordable health insurance available to millions of Americans.

The president took to Twitter Friday night:

Twitter Embed Tweet or Video

“The ruling seems to be based on faulty legal reasoning and hopefully it will be overturned,” U.S. Senator Chuck Schumer said in a statement. “Americans who care about working families must do all they can to prevent this district court ruling from becoming law.

“If this awful ruling is upheld in the higher courts,” he added, “it will be a disaster for tens of millions of American families, especially for people with pre-existing conditions.”

Americans with pre-existing conditions, before ACA, faced either high premiums or an inability to access health insurance at all.

White House spokeswoman Sarah Sanders said the judge’s decision “vindicates President Trump’s position that Obamacare is unconstitutional. Once again, the president calls on Congress to replace Obamacare and act to protect people with pre-existing conditions and provide Americans with quality affordable health care.”

“Today’s misguided ruling will not deter us,” California Attorney General Xavier Becerra, the leader of an alliance of states opposing the lawsuit, said in a statement. “Our coalition will continue to fight in court for the health and well-being for all Americans.”