Shares of two of the nation’s largest dialysis providers, DaVita and Fresenius Medical Care, soared Wednesday after California voters defeated Proposition 8 — a state ballot measure that sought to cap revenue for dialysis centers.

The two companies had collectively raised $100 million to oppose Prop. 8, which they said would have severely hurt their business and forced them to close some dialysis centers.

Their financial contributions were the main driver behind Prop. 8, setting a state record for the most money ever raised to support or oppose a single ballot measure. The No on Prop. 8 campaign raised $111 million, and 90 percent of it came from DaVita and Fresenius.

The election results were top of mind among DaVita executives, with CEO Kent Thiry kicking off a quarterly earnings call Wednesday by calling it “excellent news for all our stakeholders.”

DaVita’s stock had been underperforming the past few months to brace for the possibility of Prop. 8 going into effect, said Jake Strole, a health sector analyst with the investment and research firm Morningstar who follows dialysis companies. DaVita spent $66.6 million to defeat the measure, including $26 million in October alone, according to campaign finance records. The aggressive spending speaks to how significant the California market is for the company — about 12 percent of DaVita’s 2,500 clinics and 18 percent of its patients are in the state, according to research compiled by Morningstar.

“You can look at the market reaction — investors and the company are probably happy with the investment,” Strole said.

But DaVita executives said they expect to increase annual advocacy spending by $30 million to fight similar initiatives elsewhere.

Prop. 8 would have capped dialysis centers’ revenue at 15 percent more than the cost of staff, medical supplies, facilities and information systems. The cost of paying managers and administrators was not included in this calculation, leading dialysis operators to say the measure would have forced them to operate at a loss. The initiative would have required dialysis companies, if they exceeded the 15 percent limit, to refund insurance companies that help pay for dialysis treatment, but did not specify what insurance companies would do with the money.

Prop. 8 was drafted by the health care union SEIU-United Healthcare Workers West, which raised $20 million in support of the measure.