MINNEAPOLIS — Minnesota officials and insulin activists blasted the pharmaceutical industry Wednesday for suing to overturn a new state law mandating that drug makers provide emergency and longer-term insulin supplies to diabetics who can't afford them.

The Pharmaceutical Research and Manufacturers of America, also known as PhRMA, filed the lawsuit in federal court in Minnesota late Tuesday, just hours before the law took effect, asking the court to declare the law unconstitutional and issue a permanent injunction against enforcement.

The trade group said the Alec Smith Insulin Affordability Act violates the takings clause of the constitution because it forces insulin makers to give their product to Minnesotans for free, without any compensation from the state in return.

The lawsuit sharply changed the tenor of a news conference that Gov. Tim Walz had scheduled with Smith's parents and bill sponsors to celebrate the law taking effect. And they said the lobbying group had provided assurances to lawmakers and the governor that it would not sue if they accepted the compromise language he signed in April.

"They did something I didn't think was possible — they're more hated than COVID-19," the Democratic governor said. "How do you do this? How do you decide to be so awful on the day before this?"

But Walz and other supporters of the law pointed out that PhRMA did not seek a temporary injunction to stop the act from taking effect, so the program remains on the books and diabetics can start taking advantage of it now. The state has set up a website for the Minnesota Insulin Safety Net Program at MNinsulin.org that includes information on how to apply.

The law is named for Alec Smith, an uninsured 26-year-old Minneapolis man who died in 2017 while rationing his insulin. He couldn't afford the $1,300 per month he needed for the drug and test supplies after he aged off his mother's insurance.

His mother, Nicole Smith-Holt, said Saturday was the three-year anniversary of Alec's death and that she wanted the news conference to celebrate the hard work of everyone who campaigned for the safety net. She said it was an understatement to call the decision by PhRMA to challenge Alec's Law of behalf of the three insulin manufacturers a tragedy.

"Without the safety net that Alec's Law provides, we're going to see more Minnesotans die, and face serious long-term health consequences because they don't have emergency access to insulin," Smith-Holt said.

PhRMA spokesman Nick McGee said his group repeatedly asserted its constitutionality concerns throughout the legislative process. He provided a copy of a letter the association sent to Walz right after he signed the bill, which called it "a particularly egregious violation of bedrock constitutional requirements governing takings of private property." The letter said there was "a significant probability that a court would enjoin enforcement of the bill."

Attorney General Keith Ellison expressed outrage and vowed that his office will defend the law with every resource it has.

"I'm defending it on behalf of all Minnesotans who believe that no one should die because they can't afford their insulin," Ellison said in a statement. "I'm defending it on behalf of all Minnesotans who believe people's lives are more important than drug companies' profits."

But Erik Gordon, a professor at the University of Michigan's Ross School of Business who is an attorney and former law school professor, said the industry has a strong argument.

"What the drug companies are saying ... is you are taking our property, our insulin, with no compensation and that's unconstitutional," Gordon said. "And I think they win."

David Schultz, a visiting professor at the University of Minnesota Law School and political science professor at Hamline University, agreed the state law is vulnerable. He said the state would have done better to draft a law that taxed drug companies and used the money to subsidize insulin for people who can't afford it.

Leaders of the Republican majority in the Minnesota Senate expressed disappointment with the lawsuit, saying they thought they had successfully brokered a deal that all sides could accept — including PhRMA.

"PhRMA is missing the mark by wasting time and money on this lawsuit," GOP Sen. Michelle Benson, of Ham Lake, who chairs a key health and human services committee, said in a statement. "Minnesotans would be far better off if the pharmaceutical industry would focus on fairness in pricing."