(Reuters) - California Gov. Jerry Brown on Monday signed a bill requiring the state to source electricity from exclusively carbon-free sources by 2045, a move aimed at combating climate change that clashes with U.S. President Donald Trump’s pro-fossil fuel policies.

FILE PHOTO: California Governor Jerry Brown delivers his final state of the state address in Sacramento, California, U.S., January 25, 2018. REUTERS/Fred Greaves/File Photo

The law makes California the largest global economy to commit to 100 percent clean energy. Hawaii is the only other U.S. state to set a similar goal.

“There is no understating the importance of this measure,” Brown said at a signing ceremony in Sacramento surrounded by state lawmakers.

The law sends a message that California supports the global Paris agreement to fight climate change, he said. Trump withdrew from the accord last year over concerns that it would hurt the U.S. economy, making the United States the only country to do so.

“We are going to meet the Paris agreement and we’re going to continue down that path to transition our economy to zero carbon emissions,” Brown said.

Brown’s signing came days before he hosts a gathering of local, international and business leaders in San Francisco to highlight the urgency of addressing climate change.

California has repeatedly clashed with the federal government’s policies on climate change, immigration and other issues since Trump became president.

The bill received strong support from environmental activists, renewable energy companies and public health groups. The state’s biggest utilities, however, opposed the measure.

Utility Pacific Gas & Electric said the law could raise customer bills and make the grid less reliable. “If it’s not affordable, it’s not sustainable,” utility spokeswoman Lynsey Paulo said in an emailed statement.

The clean energy bill, known as SB 100, passed the legislature last month.

The law requires utilities to source 60 percent of their power from renewable energy by the end of 2030, up from a prior goal of 50 percent. By 2045, all of the state’s electricity must come from renewable or other zero-carbon sources.

In 2017, 32 percent of California’s retail electricity sales were served by renewable energy facilities, according to the California Energy Commission.