RICHMOND (CN) – The Fourth Circuit on Friday struck down a Maryland law intended to prevent price gouging in the sale of prescription drugs, holding the regulation violates the Commerce Clause.

The law, which went into effect in October 2017 without Governor Larry Hogan’s signature, specifically barred drug makers and wholesales from “engaging in ‘price gouging’ in the sale of an ‘essential off-patent or generic drug.’”

It also established a system for drug companies to submit pricing information to the state attorney general’s office for review.

In a letter to legislators, Hogan explained he couldn’t sign the law because he believed it to be unconstitutional on the same grounds that the Fourth Circuit cited last week.

The Washington, D.C.-based Association for Accessible Medicine, an industry group comprised of the makers of generic drugs, filed the challenge that eventually made its way to the appeals panel.

Writing for the majority, U.S. Circuit Judge Stephanie Thacker, held that the law’s “plain language allows Maryland to enforce the Act against parties to a transaction that did not result in a single pill being shipped to Maryland,” noting the law labels the drugs under scrutiny as any that are “made available for sale in [Maryland].”

“This ‘made available for sale’ language does not limit the Act’s application to sales that actually occur within Maryland, nor does it restrict the Act’s operation to the context of a resale transaction with a Maryland consumer,” she wrote.

But in the dissenting opinion, U.S. Circuit Judge James Wynn said the “made available for sale” language of the bill was ambiguous enough to pass constitutional muster.

“This Court reasonably could interpret the statute as applying only to those specific unconscionably priced pills that are sold or resold in Maryland,” he wrote.

Wynn also said its within a state’s rights to do what it takes to “protect the health, safety, and welfare of their citizens” and pointed to a Government Accountability Office study which found some cases of generic drug prices increasing 100 percent.

He also referenced a 1980 Supreme Court decision, Lewis v. BT Investment Managers Inc., to support his position. In Lewis, the high court found the commerce clause’s “limitation upon state power, of course, is by no means absolute” and could be used for the betterment of its citizens.

In its ruling, the Supreme Court said Florida was within its right to limit in-state banking activities from out-of-state banks.

“Contrary to the majority opinion conclusion,” Wynn wrote. “Maryland is authorized under its “general police powers to regulate matters of legitimate local concern.”

Chester Davis Jr., president and CEO for Association for Accessible Medicines, hailed the Fourth Circuit ruling on Friday, saying that as his organization has always maintained, “this law, and any others modeled from it, would harm patients because the law would reduce generic drug competition and choice.”Had the law been allowed to stand, Davis said, it could have lead to an overall price increase for the affected drugs because it would “increased reliance upon more-costly branded medications.”

Maryland Attorney General Brian Frosh, who represented the state in the suit, said in a statement he was disappointed by the decision and his office was still deciding how it would proceed.

He said the Fourth Circuit majority misunderstood the reach of the law, and reiterated its goal of protecting Maryland consumers from price gouging in essential medication – something he said the law does without impacting other states.