Lawmakers in Maryland are daring to legislate where their federal counterparts have not: As of Sunday, the state can sue drug companies over price spikes.

A new law, the first of its kind in the country, empowers the state’s attorney general to step in if the price of a generic or off-patent drug climbs 50 percent or more in a single year. The company must then justify the hike, and if the attorney general still finds the increase unwarranted, he or she can file suit in state court to have it reversed. Manufacturers also can face a fine of up to $10,000 for price gouging.

As Congress stalls on what many voters say is a top health concern — high pharmaceutical costs — a growing number of states are trying to tackle the issue themselves. Despite fierce industry opposition, Maryland, California, Nevada, New York and Vermont have passed legislation meant to undercut skyrocketing prices.

The state-level momentum raises the possibility that — as happened with hot-button issues such as same-sex marriage and smoke-free buildings — a patchwork of bills across the country could pave the way for more comprehensive national action.

“There is a noticeable uptick among state legislatures and state governments in terms of what kind of role states can play in addressing the cost of prescription drugs and access,” said Richard Cauchi, health program director at the National Conference of State Legislatures.

Some states are tackling transparency by requiring manufacturers to detail a drug’s production and advertising costs when prices exceed certain thresholds. Others have aimed for caps on what drugmakers can charge Medicaid or state employee benefit programs, where officials often feel the price squeeze. Still others set ceilings on what consumers face in out-of-pocket costs.

A New York law on the books since spring allows officials to limit what the state’s Medicaid program will pay for drugs. If companies don’t sufficiently discount a medication, a state review will assess whether the price is out of step with medical value.

Maryland’s measure goes further, treating price gouging as a civil offense and taking alleged violators to court. Many experts frame the law as a test case that could help define what powers states have and what limits they face in going up against the pharmaceutical industry.

“It’s a really innovative approach. States are looking at how to replicate it, and how to expand on it,” said Ellen Albritton, a senior policy analyst at the liberal consumer-health lobby Families USA, which has consulted with states on such policies.

The generic-drug industry filed a lawsuit to block the statute, arguing it’s unconstitutionally vague and an overreach of state powers. A federal district court is expected to rule soon.

The California Legislature passed a bill this month that would require drugmakers to disclose when they are about to raise a price more than 16 percent over two years and to justify the hike. Gov. Jerry Brown, a Democrat, is expected to sign the measure into law.

Nevada’s law is like California’s approach but limited to insulin prices, while Vermont’s allows officials to scrutinize up to 15 drugs with rising prices for which the state spends “significant health care dollars.”

Legislators have introduced similar bills in Massachusetts, Rhode Island, Tennessee and Montana. In November, Ohio voters will decide on a ballot initiative that would restrict what the state pays for prescription drugs in its Medicaid program and other state health plans.

But states face a steep uphill climb in passing pricing legislation given the deep-pocketed pharmaceutical industry, which can finance strong opposition whether through lobbying, legal action or advertising campaigns.

Last fall, voters rejected a California initiative that would have capped what the state pays for drugs. Industry groups spent more than $100 million to defeat it, putting it among the state’s all-time most expensive ballot fights. Ohio’s measure is attracting similar heat, with drug companies outspending opponents about 5 to 1.