SACRAMENTO — California lawmakers voted Monday to extend a climate change initiative that Gov. Jerry Brown holds up as a model for states and nations looking to lower carbon emissions.

Brown’s signature will add another decade of life to the state’s cap-and-trade program, bolstering the Democratic governor’s quest to portray California as a leader in the fight against climate change at a time when President Donald Trump is pulling back.

“Tonight, California stood tall and once again, boldly confronted the existential threat of our time,” Brown said in a statement after the vote. “Republicans and Democrats set aside their differences, came together and took courageous action. That’s what good government looks like.”

The legislation was fiercely opposed by some environmentalists who say it’s too timid for progressive California, especially those who work to clean up the notoriously smoggy air in parts of Los Angeles, the San Francisco Bay Area and the agricultural Central Valley. Conservatives also fought the measure, saying it will raise costs in an already expensive state.

But Brown and Democratic leaders were able to cobble together the two-thirds support needed in both chambers to extend the law through 2030.

Cap and trade puts a limit on carbon emissions and requires polluters to obtain permits to release greenhouse gases. Some permits, known as allowances, are given away while others are auctioned, generating billions of dollars in revenue for the state.

Brown sounded an apocalyptic tone in a rare personal appeal before a Senate committee last week, telling lawmakers that failing to pass the extension would lead to fires, disease and mass migration, not to mention higher costs for food and gasoline.

Republicans likened the bill to a tax that will hit Californians at the gas pump and the grocery store. The nonpartisan legislative analyst said last year that the existing cap and trade program accounted for an 11-cent-per-gallon increase in gasoline prices. The office has not analyzed the extension proposal.

“We could shut down the entire state of California and it would have absolutely no effect on the global climate,” said Sen. Andy Vidak, a Republican from Hanford in the agricultural Central Valley.

“But what is measureable is the effect this tax will have on the poorest of the poor in my district and across California.”

The bill was supported by national environmental groups and business interests, which echo Brown’s refrain that cap and trade is the most affordable way for California to meet its ambitious climate goals.

State law requires California to reduce greenhouse gas emissions 40 percent from 1990 levels by 2030 — among the most aggressive mandates for carbon reduction in the world.