Former President Barack Obama responded Saturday on social media to a federal judge's ruling that core aspects of the Affordable Care Act were unconstitutional, calling the decision "a reminder that Republicans will never stop trying to undo" the protections offered by his signature health care law.

"If they can’t get it done in Congress, they’ll keep trying in the courts, even when it puts people’s pre-existing conditions coverage at risk," Obama said in a Facebook post. "The only way to convince them to stop trying to repeal this law, and start working to make health care better, is to keep voting, in big numbers, in every election, for people who’ll protect and improve our care."

U.S. District Court Judge Reed O’Connor in the Northern District of Texas issued a 55-page ruling Friday in a lawsuit filed by a coalition of Republicans. The suit challenged the constitutionality of the 2010 law's individual mandate requiring people to buy health insurance. O’Connor said that when Congress eliminated the penalty for not buying insurance, the mandate was no longer constitutional under Congress' taxation powers.

The Affordable Care Act, also known as Obamacare, will remain in place while the legal battle over the law – which could end up in the Supreme Court – continues. But if O'Connor's ruling stands, all of the Affordable Care Act – from the individual mandate and protections for pre-existing conditions to Medicaid expansion and other provisions – will be stuck down.

After reminding people to enroll for 2019 coverage before the deadline, Obama said the ruling could be "a scary thing to hear, particularly if you or someone you care about has a pre-existing condition." But he said it's important to note that the decision "changes nothing for now."

"As this decision makes its way through the courts, which will take months, if not years, the law remains in place and will likely stay that way," Obama said. "Open enrollment is proceeding as planned today. And a good way to show that you’re tired of people trying to take away your health care is to go get covered!"

The ACA has become increasingly popular, particularly its requirement that insurers offer coverage to people with pre-existing medical conditions. Before the ACA, insurance companies routinely denied coverage to people who became sick while they were not covered, or people with a medical condition who lost coverage.

Because insurance companies worried they would go out of business if people could wait until they were sick to get coverage, the law included an individual mandate requiring all adults to have insurance or face a tax penalty. But federal subsidies helped keep markets stable and avoid the feared upheaval when the penalty was removed, according to UCLA Law professor Jill Horwitz.

Republicans have claimed the Democrats in control of the House, Senate and White House at the time "rammed" the legislation through without their input despite multiple hearings, hours of bipartisan debate and amendments. They also have assailed the mandate as unconstitutional. In 2012, the Supreme Court upheld the mandate on the grounds that it fell within Congress' taxation powers.

Friday, President Donald Trump hailed the Texas ruling as "great news for America" and said "Congress must pass a STRONG law that provides GREAT healthcare and protects pre-existing conditions."

President Trump:Ruling against Obamacare offers another chance for repeal and replace

"Get it done!" the president told House Minority Leader Nancy Pelosi, D-Calif. – who is likely to become House speaker next month – and Senate Majority Leader Mitch McConnell, R-Ky.

Obama said, "A lot of good people are fighting to ensure that nothing about your care will change.

"The ACA protects your pre-existing conditions, no matter how you get your insurance. Young people can stay on their parents’ plans until they’re 26. Preventive care like checkups, mammograms, and contraceptive care are still covered. Mental health care is still covered. Women can’t be charged more just for being a woman. All of that is guaranteed by the ACA as long as it’s the law," Obama said.