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."

Brown portrays the initiative, which would have ended in 2020, as essential for the survival of civilization. Extending it has been one of his highest priorities as he nears the end of his fourth term, but critics say it fails to aggressively combat pollution.

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.

The extension was part of a three-bill package, which passed. One measure aims to improve local air quality, and helped bring some Democrats on board with the cap-and-trade deal. Republicans, however, favored a third bill that may give them more of a say in how to spend the money collected through cap and trade.

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. Without cap and trade, state regulators will be forced to enact restrictive mandates on polluters that would be burdensome for businesses and significantly more expensive for consumers, Brown said.

The fight over the legislation showed the divisions between environmentalists who work nationally, focusing on reducing global carbon emissions and creating a policy that can be replicated elsewhere, and environmental justice advocates who work locally.

The latter group said cap and trade allows polluters to keep fouling the air around major sources of pollution like oil refineries and objected to concessions Brown made to the oil industry and other polluters in a bid to win support from Republicans and moderate Democrats.

Brown's urgency to extend a program that doesn't expire for another 2½ years drew questions from some lawmakers. The governor says the move would give businesses the certainty they need to plan.

A quick extension also would bolster Brown's global advocacy for climate action. He made a high-profile trip to China last month, plans to attend a climate summit in Germany in November and will host a climate conference next year in San Francisco.