Texas, along with 19 states, had argued to U.S. District Judge Reed O'Connor that they had been hurt by a jump in the amount of people utilizing state-backed insurance.
The ruling is expected to be appealed to the Supreme Court and the law will remain in effect until the appeals process is over. California and other states had intervened to defend the 2010 health care law after the Trump administration declined to defend its provisions that guarantee coverage for people with pre-existing conditions, arguing that those provisions can not be separated from the mandate.
The decision came on the evening before the December 15 deadline for Americans. We can not go back to the days when insurance companies regularly denied coverage for people who are sick.
The White House said late Friday that it expects the ruling to be appealed to the Supreme Court.
Without that penatly, he wrote, "Obamacare" is unconstitutional. In any case, it looks like Obamacare's future will once again depend on the courts.
The ACA has been a battle between Democrats, who favour the law, versus Republicans who have voted repeatedly to repeal it.
"When House Democrats take the gavel, the House of Representatives will move swiftly to formally intervene in the appeals process to uphold the life-saving protections for people with pre-existing conditions and reject Republicans' effort to destroy the Affordable Care Act", Mrs. Pelosi said.
US Senate Democratic leader Chuck Schumer said: "If this bad ruling is upheld in the higher courts, itwill be a disaster for tens of millions of American families". They argued that the mandate remains constitutional and that the rest of the law, in any event, can stand without it.
O'Connor appeared skeptical of the Democratic states' argument during his questioning in the case in September.
House Majority Whip Steve Scalise boasted his chamber passed a law to replace Obamacare in May 2017, however, leaving the situation in chaos. Currently, about 10 million have subsidized private insurance through the health law's insurance markets, while an estimated 12 million low-income people are covered through its Medicaid expansion.
This comes the day before the Saturday deadline to enroll in the ACA.
Democratic leaders, meanwhile, reacted harshly to the decision.
Since then public opinion on the ACA has shifted from mostly negative to generally favorable.
It's no wonder that politicians on both sides of the aisle promised to protect those with pre-existing conditions during the election.
In Texas alone, there are more than 4.5 million "nonelderly adults" with pre-existing conditions that could make it hard for them to get health insurance if Obamacare went away, statistics show.
Twenty states with Republican attorney generals brought the lawsuit, but MI was not one of them.
O'Connor is a conservative Republican appointee who has previously blocked other Obama-era policies. However, the Trump administration sided with Texas et all.
"Guaranteed issue" requires insurers to offer coverage to everyone regardless of their medical history. That includes a prohibition on insurers writing policies that exclude a particular condition - for example, a recurrence of breast cancer.
Under the law's community rating provision, insurers are not allowed to set premiums based on a person's health history. "There is no impact to current coverage or coverage in a 2019 plan".