In a victory for California's rooftop solar industry, a state assembly bill cleared its last legislative hurdle Thursday and is headed to the desk of Gov. Jerry Brown, who is expected to sign it.

The complex bill, named AB 327 and authored by Assemblyman Henry Perea, D-Fresno, tackles residential electricity rates and the solar policy known as "net metering" at the same time. After months of negotiations and amendments, the bill emerged with the support of consumer advocates, utilities and the solar industry, who are often at odds.

The bill began primarily as an effort to rejigger the rates that California consumers pay for electricity. For years, residents of the hot Central Valley, who rely on air conditioning in the sweltering summer months, have struggled with electric bills far higher than those of their coastal counterparts because of a tiered rate system that charges progressively more for the amount of electricity used.

If the measure is adopted, state regulators with the California Public Utilities Commission will be given authority to implement new rates, including a possible surcharge of up to $10 per customer, and $5 per low-income customer, on monthly bills. Though the surcharge remains highly controversial and is sure to be fought by consumer advocates, utilities argue it ensures that all customers, whether they have rooftop solar systems or not, pay a portion of the costs associated with maintaining transmission lines and the distribution grid.

"AB 327 modernizes electric rates by allowing the CPUC authority to create a fair rate structure that protects consumers from exorbitant utility bills," Perea said in a statement.

The bill includes several provisions that protect net metering, a popular policy that allows homeowners, school districts and businesses to offset the cost of their electricity with the rooftop solar power they generate and export to the grid. Current state law requires California's major utilities to make net metering available to customers on a first-come, first-served basis, but the program is currently capped at 5 percent of a utility's "aggregate customer peak demand."

AB 327 paves the way for the net metering cap to be removed -- something the solar industry has long sought.

"This is a huge step forward for the solar industry," said Sanjay Ranchod, head of government relations for San Mateo-based SolarCity. "It creates a future where we have no regulatory limitations to the amount of rooftop solar."

Rhone Resch, the president and CEO of the Solar Energy Industries Association, also applauded the bill's passage.

"This is a banner day in California," said Resch. "Once again, state lawmakers have set the bar high when it comes to the adoption of renewable energy."

San Francisco-based PG&E has more than 90,000 net-metering customers throughout its vast Northern California territory and is adding roughly 2,000 new net metering customers each month.

The bill also makes it clear that California's Renewable Portfolio Standard can be expanded. Current law requires California utilities to get 33 percent of their electricity from renewable sources by 2020; AB 327 says 33 percent is a floor, not a ceiling. Some lawmakers have already talked about raising the RPS to 40 or even 50 percent and beyond.

Consumer advocates said Thursday that the details on rates for consumers will now be hashed out at the CPUC.

"A lot of folks are wondering 'What does this mean for my bill?' and the truth is that we don't know yet," said Stephanie Chen, energy policy director for the Greenlining Institute, a racial justice organization based in Berkeley. "But we want to see equity, whether you live on the coast or inland, have solar or don't have solar. Whatever category you fall into, the rates need to be fair."

Contact Dana Hull at 408-920-2706. Follow her at Twitter.com/danahull.