California has set a goal of phasing out electricity produced by fossil fuels by 2045 under legislation signed Monday by Gov. Jerry Brown, who said the policy should serve as a model for other states and nations.

Governor Brown, who has positioned California as a global leader in the effort to reduce greenhouse gas emissions, approved the measure as he prepares to host a summit in San Francisco of climate change leaders from around the world starting Wednesday.

The new law, along with an executive order Brown signed directing California to take as much carbon dioxide out of the air as it emits, represent the latest in a string of ambitious environmental initiatives as California seeks to fill a void left by President Trump's decision to withdraw from the Paris climate accord and his efforts to boost the coal industry.

"We want others to do likewise, and if enough people often enough do what is needed we will curb global warming," Brown said. "But we're definitely at the beginning of what's going to be a long and difficult and contentious journey."

The state is pushing to rapidly expand adoption of electric vehicles and has created a "cap and trade" program to put a price on carbon emissions, creating incentives to reduce them. It's working toward a goal to reduce greenhouse gas emissions by 40 percent over the next 12 years.

The efforts have drawn criticism from business groups worried about rising electric bills. Some environmentalists say Brown is too cozy with oil and gas interests and plan to disrupt the San Francisco summit.

The renewable energy measure would require California's utilities to generate 60 percent of their energy from wind, solar and other specific renewable sources by 2030. That's 10 percent higher than the current mandate.

The goal would then be to use only carbon-free sources to generate electricity by 2045. It's merely a goal, with no mandate or penalty for falling short. California's renewable energy goal is not as ambitious as Hawaii, which has adopted a 100 percent renewable energy mandate.

Phasing out fossil fuels would be a massive change in the energy grid. Utilities rely on natural gas plants to meet demand when renewables fall short, particularly in the early evening when the sun sets and people turn on their air conditioners as they get home from work.

Utilities are already dealing with an abundance of solar energy during peak times, which must be offloaded to other states when there's not enough demand locally for the power.

Brown advocates for a regional energy grid that would more easily allow Western states to share energy. An effort he pushed has died the past two years in the Legislature, with critics arguing California shouldn't be part of a grid with states that rely on coal. But Brown on Monday said moving toward a regional grid is essential to achieving California's new 100 percent clean energy goal without sending electric prices skyrocketing.

"Those who don't want it are going to be foisting very high prices on California, and I think there will be resistance to that," Brown said. "It may take one or two years, but we're going to get there. It makes too much sense."

He also pointed to the need for better battery technology to store energy.

Renewable energy experts have looked to batteries that can store solar energy generated in the afternoon as one solution, but the technology is not ready for wide-scale deployment. Another potential solution is pumped storage, in which water is pumped uphill in the afternoon using solar energy and then released through hydroelectric generators after the sun sets.

Brown has often faced criticism that he's too lenient with the oil industry, including from environmental groups pushing him to create a moratorium on new oil and gas wells in the state. He rejected the criticism and said that California's approach to climate change relies on curbing emissions from a variety of sources, including oil.

California has nearly 54,000 active wells, some of them close to urbanized areas in Southern California and the Central Valley, according to state data.

California ranked sixth among states in crude oil production in May, the latest data available from the US Energy Information Administration. The state ranks 15th in natural gas production. California's production of crude oil has fallen steadily since the mid-1980s.

Business groups also opposed the measure amid concerns that it would raise the price of energy and, together with California's other environmental and labor protections, make it hard to compete with firms in other states.

"If we're going to have these first-in-the-nation laws, we want to see first-in-the-nation benefits," said Rob Lapsley, president of the California Business Roundtable.

The measure was written by state Sen. Kevin de Leon, a Los Angeles Democrat who is running for US Senate against Sen. Dianne Feinstein (D) of California.

"Today we're setting a marker that will be remembered by future generations," Senator de Leon said.

The companion executive order Brown signed directs the state to achieve "carbon neutrality" no later than 2045. After that, he says the state should emit net negative greenhouse gas emissions.

The order directs several state agencies to set targets for artificially removing carbon dioxide from the air through a process known as "sequestration."

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

That could involve restoring forests and wetlands to use plants to consume carbon dioxide or new technologies that capture carbon dioxide, compress it and inject it into the ground.

The Associated Press reported this story, with additional reporting from Associated Press writer Kathleen Ronayne.