LOS ANGELES — California took some of the most aggressive steps yet to counter the effects of climate change as legislators voted Tuesday to require that 100 percent of the state’s electricity come from carbon-free sources.
The bill gives the state until 2045 to meet the goal. California had already imposed a mandate to generate 50 percent of its electricity from renewable sources by 2030.
The move highlights California’s determination to be a leader on climate issues. In May, state regulators revised the building code to require newly built homes to be equipped for solar power.
The state’s aggressiveness comes as the Trump administration is moving to loosen or abandon environmental regulations and promoting a revival of the coal industry. And it follows a year in which catastrophic wildfires that many attribute to climate change have been responsible for dozens of deaths in the state, destroyed homes and businesses and cost billions of dollars.
“This is a pivotal moment for California, for the country and the world,” said Michael Brune, the executive director of the Sierra Club.
California joins Hawaii, which passed legislation in 2015 calling for 100 percent carbon-free electricity by 2045. Massachusetts, New Jersey, New York and Washington, D.C., are also considering such a mandate, according to the National Conference of State Legislatures. Maryland and Colorado had considered bills but have not passed the requirement.
The California bill passed the State Assembly on Tuesday by a vote of 44 to 33. The Senate passed a version of the measure in May 2017. The two chambers still must agree on amendments, but it is expected to be made final by the close of the legislative session on Friday.
Gov. Jerry Brown, a Democrat in his final months in office, is expected to sign the bill. Its passage comes ahead of a Global Climate Summit next month in San Francisco, where he will serve as a co-chairman.
The governor’s own signature energy initiative, to create a single authority to manage the electric grid for most or all of the West, also awaits the legislature’s action. The plan is meant to increase efficiencies across the region, lowering the cost of generation, and could give rise to a single entity that could apply clean-energy policies across more territory.
In the days before the vote, the bill on carbon-free electricity got a prominent bipartisan push with separate letters to legislators from former Gov. Arnold Schwarzenegger, a Republican, and former Vice President Al Gore, a Democrat.
The measure was put forward by State Senator Kevin de León, who is seeking to unseat Senator Dianne Feinstein, a fellow Democrat, in the November general election. “Because of the fires, because of the extreme drought, because of the anti-environmental edicts coming from this president, there’s a huge ground swell of support,” Mr. de León has said about the legislation, designated Senate Bill 100.
Opponents said the mandate was an example of legislative overreaching — poorly thought out, potentially costly and not provably achievable. “One fact you cannot dispute: this does increase the cost,” said Bill Brough, a Republican assemblyman from Orange County. “You cannot dispute that this is going to be passed on to the ratepayers.”
The mandate for carbon-free electricity also faced strong criticism from investor-owned utilities, partly because they say it focused on only one source of greenhouse-gas emissions. In California, the transportation sector produces more than two-thirds of those emissions.
“You need to make sure you’re looking at the underlying cause,” said Pedro J. Pizarro, president and chief executive of Edison International, the parent company of Southern California Edison, one of the country’s largest investor-owned utilities.
Edison and the state’s two other investor-owned utilities, Pacific Gas and Electric Company and San Diego Gas and Electric Company, said the mandate could prove expensive for consumers.
In 2016, California’s investor-owned utilities used carbon-free sources to deliver almost 35 percent of their electricity to retail consumers. But Mr. Pizarro said that because solar and wind power were intermittent power sources, there remained a need for power plants burning fossil fuels, at least until energy storage became more affordable.
“Natural gas will be part of the solution, for sure,” he said.
Environmentalists and proponents of solar and wind power say carbon-free sources have served as economic engines for California in addition to addressing electricity needs.
“California embraces renewable energy for economic and job creation reasons as much as for environmental reasons,” said Bernadette Del Chiaro, executive director of the California Solar and Storage Association, a trade group.
And backers said even the latest milestone in the state’s efforts left a long way to go.
“Decarbonizing our grid is low-hanging fruit,” Wendy Carrillo, a Democratic assemblywoman from Los Angeles, said before Tuesday’s vote. “We need to make our cutting-edge innovation our standard. We have an opportunity to create amazing change in our state.”