California lawmakers in a bipartisan vote late Monday extended the much-debated multi-billion-dollar cap-and-trade program for another decade. The carbon emissions trading system was set to expire in 2020.

Working overtime, both houses passed measures to extend cap-and-trade through 2030 (AB 398) and to address nagging environmental justice issues (AB 617). The package was crafted by Gov. Jerry Brown’s office and the leadership in the California Assembly and Senate in the past two weeks.

State leaders lauded the legislation’s passage but some environmental organizations said it still was not enough. Nevertheless, Brown and Senate President pro Tempore Kevin de Leon and Assembly Speaker Anthony Rendon pointed to the bipartisan nature of Monday’s vote.

The state “stood tall and once again, boldly confronted the existential threat of our time,” said Brown, noting that Democrats and Republicans “set aside their differences, came together and took courageous action. That’s what good government looks like.”

In an unprecedented move at the Senate hearing on the measures last week Brown testified and then remained with the legislative leaders on a panel during the entire hearing, answering questions and offering encouragement to naysayers during the afternoon-long session in Sacramento.

As the centerpiece of the milestone 2006 climate change law (AB 32), pieces of which the California Air Resources Board (CARB) has been implementing for more than a decade, the cap-and-trade program was created to require electric generation plants, major industrial operators and refineries limit greenhouse gas (GHG) emissions while allowing emissions credits to be traded as the limits are gradually tightened.

At the end of last year’s legislative session, Brown and state legislative leaders agreed on a distribution plan for proceeds from the $3.2 billion cap-and-trade program for the current fiscal year. The deal allocates $900 million in investments and reserves another $462 million for fiscal 2016-2017, much of the money going to various transportation programs that are part of the state’s climate change initiative.

Natural Resources Defense Council (NRDC) Legal Director Alex Jackson said the legislative action “solidifies California’s pathway to a low-carbon future,” while chiding President Trump for “retreating” from U.S. climate commitments. The action provides “much needed resolve” to other states and regions to stand up to the president, who has signaled the United States would retreat from global climate change initiatives.

Last week Brown and the legislative leaders had unveiled a path to extending the life of California’s cap-and-trade system for pollution credits with two bills. In April the state’s market-based auction was upheld on a 2-1 vote by a state appellate court, supporting CARB’s authority to hold carbon emission auctions and rejecting arguments by business leaders.