Maryland has appealed to the Supreme Court to keep intact a state law that requires generic drug manufacturers to refrain from massive price hikes.

The outcome could have major ramifications across the country as states step in to attack high drug prices. More than a dozen states have already considered laws similar to Maryland's, but have not passed any.

At issue is an April decision by the 4th Circuit Court of Appeals to strike down the state's anti-gouging law that went into effect this year.

The law regulates prices of off-patent or generic drugs and applies to all companies selling drugs in the state, whether they are located in Maryland or not.

But the generic drug lobbying group Association for Accessible Medicines sued to overturn the law.

The 4th Circuit said in April that the state law was unconstitutional because it violates the Constitution's Commerce Clause. Maryland cannot impose requirements on drugmakers that are not in the state, according to the appeals court’s opinion.

“We hold that the statute violates the dormant commerce clause because it directly regulates the price of transactions that occur outside Maryland,” the opinion said.

The appeals court overturned a lower court’s dismissal of the generic industry’s lawsuit and called for the lower court to rule in the industry’s favor.

Now the state is petitioning the Supreme Court to overrule the appeals court and keep the law.

Maryland Attorney General Brian Frosh wrote in the petition to the Supreme Court that the appeals court’s decision takes away the state’s ability to “protect consumers from predatory commercial practices that originate out of the state, even though they are directed into the state and will directly harm its citizens.”

The Association for Accessible Medicines said that it is looking at the petition from Maryland.

"We believe the Fourth Circuit Court of Appeals correctly determined that the state of MD lacks authority under the Commerce Clause of the Constitution to regulate transactions that occur outside of its borders," said Jeff Fraser, the group's general counsel.

States have increasingly passed laws to halt price gouging for generic drugs. As of July, there have been bills filed in 16 states, but Maryland is the only state to have passed a law, according to data from the National Conference of State Legislatures.

The group couldn’t say if the court ruling back in April led to a chilling effect in other states.

Generic drugs are traditionally cheaper than brand-name equivalents but sometimes prices can spiral out of control if the generic drug has little or no competition.