SACRAMENTO — Saying there is “real evil when so many people are suffering so much from rising drug profits,” Gov. Jerry Brown on Monday signed into law what is believed to be the nation’s most comprehensive legislation aimed at shining a light on prescription drug pricing.

“The essence of this bill is pretty simple,” Brown told a room filled with supporters of Senate Bill 17. “Californians have a right to know why their medical costs are out of control, especially when the pharmaceutical profits are soaring. That’s the take-away message.”

The new law — which goes into effect on Jan. 1, 2018 — aims to make drug prices for both public and private health plans more transparent in California. It would do so by requiring pharmaceutical companies to notify health insurers and government health plans like Medi-Cal at least 60 days before scheduled prescription drug price hikes that would exceed 16 percent over a two-year period. It would also force drug companies to explain the reasons behind those increases.

The governor characterized SB 17 in terms of fairness. Looking across the country, and even beyond the U.S., he said, “the inequities are growing.

“The rich are getting richer, the powerful are getting more powerful,” Brown said. “And a growing number of people are getting more desperate, more alienated and the reaction and hostility to institutions — the lack of all being in it together — is intensifying.”

While noting that pharmaceutical companies are part of the “great engine of creativity, and innovation and productivity,” out-of-control drug prices are “just another example where the powerful get more power and take more,” he said.

“This measure is a step at bringing transparency, truth, exposure, to a very important part of our lives — that is the cost of prescription drugs.”

Authored by Sen. Ed Hernandez, D-West Covina, and co-authored by Assemblymen David Chiu, D-San Francisco and Jim Wood, D-Healdsburg, SB 17 has been strongly opposed by the pharmaceutical industry which had spent millions on lobbyists and ads to defeat it, partially out of fear that the legislation could become a national model and the first major step toward price controls.

“It is disappointing that Gov. Brown has decided to sign a bill that is based on misleading rhetoric instead of what’s in the best interest of patients,” Priscilla VanderVeer, spokeswoman for the Washington, D.C.-based Pharmaceutical Research and Manufacturers of America, said in an email.

VanderVeer said there is “no evidence that SB 17 will lower drug costs for patients.” Still, she allowed, “We are ready to roll up our sleeves and do the hard work of working collaboratively with the Governor, Legislature and health care stakeholders to find common sense solutions that improve affordability and access for patients.”

Hernandez had introduced a similar bill last year, but after it was watered down with amendments, he pulled it from consideration.

By then, the uproar over stratospheric drug costs that has been building in the past few years had risen exponentially, ignited by headlines over the $600-plus retail price for a two-pack of EpiPens, the lifesaving auto-injector that treats severe allergy attacks.

Hernandez reintroduced the bill this year, this time backed by labor, business, health plans, consumer groups, hospitals and chambers of commerce.

“This coalition that came together was like no other I’ve ever seen and been involved with,” Hernandez said Monday before the bill signing.

On Monday, he repeated his hope that the new law would be adopted at the federal level.

The bill does not actually control drug prices, per se, leading some critics to suggest it is toothless. But the bill’s backers have strongly rejected that argument, saying that transparency in other health care sectors has been successful in reducing costs.

Anthony Wright, executive director of Health Access California, agreed.

He said the advance notice and information required under SB 17 “is invaluable” to large health care purchasers such as insurers, union trusts and employers, and would enable them to drive a better deal for consumers.

“We require insurers, doctors and hospitals to provide this kind of transparency every year,” Wright said. “It’s finally time to ask the same of the drug companies.”

Brown, who has until Sunday to decide which pieces of legislation will become law, signed a related bill on Monday by Assemblyman Wood.

Assembly Bill 265 will prohibit prescription drug manufacturers from offering discounts for name-brand drugs, if a less-expensive equivalent brand is available, preventing the use of higher-priced drugs when unnecessary.