A battle over capping how much California pays for prescription drugs is shaping up to be one of the most expensive ballot propositions in state history, with the pharmaceutical industry expected to dump close to $100 million into the fight by election day.

Proposition 61 would bar state agencies from paying more than the U.S. Department of Veterans Affairs for drugs for roughly 4 million Californians, including some state employees, prisoners and Medi-Cal recipients. Under federal law, the VA gets a 24 percent discount off average drug prices from manufacturers.

Proponents say the initiative could set a standard for lower drug prices across the country at a time when skyrocketing costs have spurred outrage. The potential for California to drive a trend, supporters say, is exactly why drugmakers are fighting so hard to knock down the measure.

“That’s what the drug companies are worried about: We get this passed in California, and it will make a huge difference, and then other areas will say, ‘Why not us?’” said Malinda Markowitz, president of the California Nurses Association, which stands with the AARP among the largest supporters of the proposition.

A handful of elected officials, including senator and former presidential candidate Bernie Sanders, have come out in favor.

But it’s not just Big Pharma looking to defeat the bill. The most vocal opponents are consumer advocates, including veterans organizations that worry drugmakers would respond to the bill’s passage by increasing VA prices. Some groups with a history of criticizing drug prices have been reluctant to back the measure, questioning whether Prop. 61 is the right tool.

“We completely agree with (supporters) that drug pricing, particularly for people with chronic diseases, is a very substantial issue. We have done extensive work negotiating the price of pharmaceuticals with manufacturers and trying to do things to control cost,” said Dana Van Gorder, executive director of Project Inform, a patient advocacy group that works primarily with people with HIV and hepatitis C.

“We’re just not convinced that this is the right mechanism,” he said. “It might be a little ham-handed approach.”

Prop. 61 would not directly apply to the bulk of state residents — the 20 million people who have private insurance, usually through an employer. It also would not apply to 10 million people covered by Medi-Cal managed care plans.

But California pays about $3.8 billion in drug costs each year for people who get health care through the state. The measure would affect about 4.2 million people in all, most of them on Medi-Cal’s fee-for-service plans. Ideally, supporters say, the measure will have a ripple effect, leading to wider price cuts.

As of last week, pharmaceutical companies had donated about $87 million to fight the proposition, while leaning on nonprofit consumer groups to speak out against the measure. The industry’s main lobbying group, Pharmaceutical Research and Manufacturers of America, would not agree to a phone interview.

The group “has serious concerns about this poorly written measure because of the negative impact it will have on Californians,” said spokeswoman Priscilla VanderVeer in an email. “We are opposed to Prop. 61 because it is flawed, and we share the concerns that have been highlighted by the more than 150 groups who are opposed to the measure. Its unintended consequences will only hurt patients, veterans and taxpayers.”

The measure is being backed primarily by the AIDS Healthcare Foundation in Los Angeles, which has contributed the bulk of the $14.5 million supporting the campaign — including $5 million last week.

The foundation is run by Michael Weinstein, who’s known, primarily among HIV and AIDS advocacy groups, for his tendency to run roughshod over his peers in policy work. Many leaders in those groups privately blame Weinstein for the proposition’s perceived weaknesses.

But that may not matter. Supporters are counting on a national climate of frustration with Big Pharma.

Companies have been sharply criticized for recent price demands — notably the $1,000-per-pill cost of a hepatitis C medication, the 5,000 percent increase of a little-known antiparasitic drug, and the spike to $600 for EpiPens, used to treat life-threatening allergic reactions. Other bumps have affected insulin, blood pressure medications and drugs to treat cancer and HIV.

Earlier efforts to combat price increases have fallen flat, including a bill by Assemblyman David Chiu, D-San Francisco, that wouldn’t have directly touched prices but required drugmakers to report the costs and profits of their most expensive products. More traditional routes to control drug prices haven’t worked, Prop. 61 supporters say, because the pharmaceutical industry has too much sway among elected officials and government agencies.

“I believe this measure is the last resort we have as Americans to address skyrocketing prices,” Chiu said. “The buck needs to stop with California voters.”

But worried critics say the state’s system of drug purchasing is too complex and varied to be revised with one over-arching measure that could bring negative complications. And there’s no guarantee the measure would actually decrease costs.

A report from the state Legislative Analyst’s Office found “potential” for drug cost reductions for the state, but noted “major uncertainties” about how the measure would be implemented and whether drug companies would cooperate. Instead of seeing price relief, say groups critical of the bill, some consumers could pay more for prescriptions if companies raise VA prices — or increase prices for private insurers to offset reductions given to the state.

Or the state could lose access to certain drugs altogether if their makers simply decide not to sell them at lower prices, critics say.

“Prop. 61 could result in higher prescription drug costs to the state, and lack of access. It could invalidate contracts the state has with manufacturers,” said Alexandria Felton, senior director of health policy with the Silicon Valley Leadership Group, which represents tech companies including a handful of drug manufacturers. “This is a case where we have more questions than we have answers.”

There’s little doubt, at least, that the pharmaceutical industry is scared, said Richard Scheffler, a health economics and public policy professor at UC Berkeley.

“The barometer of how scared they are is measured by how much they’re spending,” he said. “I think they’re actually afraid of this one.”

Erin Allday is a San Francisco Chronicle staff writer. Email: eallday@sfchronicle.com Twitter: @erinallday