The ruling by a federal judge in Texas that the Affordable Care Act is unconstitutional will likely be overturned, according to health policy experts and analysts on Wall Street.

On Friday, District Court Judge Reed O’Connor declared that former President Barack Obama’s signature health law was inconsistent with the U.S. Constitution after Congress last December repealed the individual mandate that imposed a tax penalty on uninsured consumers.

The controversial call to leave as many as 20 million people without insurance was met with uproar by politicians and healthcare advocates, many of which described the ruling as flawed and almost certain to be overturned.

In a Washington Post op-ed, Nicholas Bagley, a law professor with a focus on health policy at the University of Michigan, argued that the "logic of the ruling is as difficult to follow as it is to defend." "This case is different; it's an exercise of raw judicial activism," Bagley said. "Don't for a moment mistake it for the rule of law.”

Conservative figures, many of which previously criticized the law, also questioned the ruling. Philip Klein, executive editor of the conservative-leaning Washington Examiner and author of a book on "overcoming" Obamacare, described O’Connor’s decision as an "assault on the rule of law."

"If Congress repealed all of Obamacare tomorrow, I'd throw a party. Despite my policy preferences, I'd say the latest decision from U.S. District Court Judge Reed O'Connor of Texas declaring Obamacare unconstitutional is an assault on the rule of law," he wrote in an op-ed Monday.

Wall Street was similarly confident that O’Connor’s ruling will be overturned. In a note released Sunday, Citigroup wrote that they “see little probability of this decision sticking if you apply any reasonable logic,” reported Barron’s. Analysts including Ralph Giacobbe pointed out that there have already been around 70 failed attempts to revoke the entire law and added that Supreme Court Chief Justice John Robert is unlikely to overturn a law that he once voted to save.

Buying Opportunities?

Should, as many appear to believe, the Obamacare ruling be rescinded, the stocks adversely impacted by O’Connor’s decision could be set to rebound. They include managed care providers Molina Healthcare Inc. (MOH) and Centene Corp. (CNC), hospital operator Community Health Systems Inc. (CYH), HCA Healthcare Inc. (HCA), the largest for-profit U.S. hospital operator, insurer Cigna Corp. (CI) and Tenet Healthcare Corp. (THC).

Brokerage firm Leerink noted that many insurance and hospital stocks impacted by Friday’s decision had already been over-punished by investors anyway. Analysts at the Boston, Massachusetts-based firm claimed that most of the large insurance companies actually have little exposure to the law, according to Barron’s. They cited Anthem Inc. (ANTM), UnitedHealth Group Inc. (UNH) and WellCare Health Plans Inc. (WCG) as examples.

The health-care sector is the best performing of 2018, and Craig Johnson, senior technical research analyst at Piper Jaffray, called it a "buy" during an interview with CNBC on Monday. “Many parts inside of the health-care sector are making 26-week relative strength new highs,” he said, recommending Medtronic PLC (MDT) specifically.

Brad Sorensen, market and sector analysis head at the Schwab Center for Financial Research, earlier this month advised investors to be patient during "short-term dips."

"We believe an outperform rating for the entire sector is appropriate, although at times it will feel disappointing as the sector experiences both short-term dips on speculation as to what changes may or may not occur, but we urge investors to remain patient and ride out these short-term potential storms."