The extension of the law was considered critical to Gov. jerry Brown's efforts to step up the fight to address climate change in the face of President Donald Trump's antipathy to the issue.
But it wasn't easy. Democrats in the state legislature supported the bill, but they were one vote short of being able to pass the extension on their own.
Most Republicans were lukewarm at best about it, and conservative Republicans were dead set against it. That resulted in the entire caucus saying they opposed it.
Last week Brown addressed the legislature in person, giving an impassioned speech about how important he believes the carbon emission reduction law is to Californians, and the world.
He told lawmakers that failing to pass the extension would lead to more wildfires, disease and mass migration, not to mention higher costs for food and gasoline.
But Republicans said the law has already significantly raised gas prices and will continue to do so.
In a statement released after the vote, Brown said, "Tonight, California stood tall and once again, boldly confronted the existential threat of our time."
"Republicans and Democrats set aside their differences, came together and took courageous action. That's what good government looks like," the governor said.
Had the legislature not ceded to the governor's passion -- he called renewal of the cap-and-trade program his highest legislative priority -- the initiative would have ended in 2020.
The law, which puts a limit on carbon emissions and requires polluters to obtain permits to release greenhouse gases, will now remain in effect through 2030.
It requires the state to reduce greenhouse gas emissions 40 percent from 1990 levels by 2030, and is considered among the most aggressive mandates for carbon reduction in the world.
For additional information: