(Reuters) - The main U.S. trade group for generic pharmaceutical companies filed a lawsuit on Thursday seeking to block a recently adopted Maryland law that lets the state attorney general sue generic drugmakers that sharply raise prices.

The Association for Accessible Medicines filed the lawsuit in federal court in Baltimore to seek an injunction that would block state officials, including Maryland Attorney General Brian Frosh, from enforcing the law.

“If this new law goes into effect, it will harm patients and our communities by reducing choice and limiting access to essential medicines that people need,” Chip Davis, the group’s chief executive, said in a statement.

A spokeswoman for Frosh’s office said it had just received the lawsuit and will review it.

The measure was passed by Maryland’s Democrat-controlled legislature in April amid concerns about rising U.S. drug costs. Governor Larry Hogan, a Republican, said in May that he would allow it to take effect without his signature.

The bill allows Maryland’s state authority on Medicaid, a federal healthcare program for the poor, to let the attorney general’s office know when it sees patients being charged an “unconscionable increase” for essential generic drugs.

The attorney general could then seek an explanation from the manufacturer and sue to protect consumers, with a fine of up to $10,000 for each violation. A judge could order the company to reverse its price increase.

The Association for Accessible Medicines, which represents companies such as Teva Pharmaceutical Industries Ltd and Mylan NV, was formerly known as the Generic Pharmaceutical Association.

In its lawsuit, the association argued that the law, if allowed to take effect as scheduled in October, would grant Maryland unprecedented powers to regulate the national drug market in violation of the U.S. Constitution.

The group said the law would unleash a potentially unlimited number of lawsuits seeking to punish generic drugmakers for prices charged for drugs made available in the state.

It also said the law was unconstitutional because of what it said was a vague prohibition on “price gouging” that provides drugmakers no meaningful description of what it covers.

The group estimated that generic drugs saved Maryland $4.1 billion in 2016.

The case is Association for Accessible Medicines v. Frosh, et al, U.S. District Court, District of Maryland, No. 17-cv-1860.