SACRAMENTO — In a hard-wrought victory for Gov. Jerry Brown and top Democratic lawmakers, the California Legislature late Monday pulled off a political triumph: passing with a supermajority vote a proposal to extend California’s signature program for regulating global-warming greenhouse gases through the end of 2030.

The deal — hashed out behind closed doors and blasted with opposition when it was unveiled this month — was thought to be in trouble as late as last week, when the vote was delayed until Monday. But it ultimately succeeded, a feat made possible largely by the pragmatic Brown and his liberal allies, who accompanied direct appeals with tax breaks and other deal-sweeteners to industry. Those moves brought major business interests — and some business-friendly moderates — on board.

“Tonight, California stood tall and, once again, boldly confronted the existential threat of our time,” a jubilant Brown​ said in a statement issued after the vote​. Then, with a seeming nod toward Washington politicians who can’t find a compromise to deliver a simple majority vote on health care, he continued: “Republicans and Democrats set aside their differences, came together and took courageous action. That’s what good government looks like.”

Assembly Bill 398 won the support of 28 of 40 senators — including one Senate Republican, Sen. Tom Berryhill, Oakdale — and 55 of 80 lawmakers in the Assembly. The Assembly majority included seven Republicans, among them the East Bay’s Catharine Baker.

“What we got out of this package today, we lowered taxes, we reduced costs, we reduced regulations and at the same time we’re going to protect our environment. That’s a good deal,” ​said Assembly Republican Leader Chad Mayes of Yucca Valley, one of the supportive Republicans, appearing with Brown and other proponents in a celebratory news conference after the vote.

Brown, who has been making a name for himself as an international climate leader as President Donald Trump stepped aside on the issue, was under tremendous pressure to pass this cap-and-trade deal over objections from some on the left and the right. Talking of AB 398, he told lawmakers last week: “This is the most important vote of your life.”

Related Articles Cap and Trade opponent: Climate change gives California Democrats an excuse to raise taxes

Cap and Trade advocate: Business supports anti-pollution, pro-clean tech bill

Debate rages over California cap-and-trade deal, concessions to Big Oil Brown needed a two-thirds vote in each house — the threshold required to pass new taxes — to ward off court challenges from those arguing the program amounts to an illegal tax because it forces businesses to pay for carbon-emission permits. And with the absence this week of one Democratic lawmaker and objections from a handful of others, he needed help from both sides of the aisle, despite the Democrats’ two-thirds supermajority in both houses.

To win GOP support in the Assembly, the Legislature passed a constitutional amendment introduced Friday by Mayes that should give Republicans more say in how the state spends money received from selling “allowances” — essentially, an ever-shrinking number of permits that industry must obtain for each ton of carbon released into the atmosphere.

Legislators also passed Assembly Bill 617, by Cristina Garcia, D-Bell Gardens, to strengthen monitoring and regulation of air pollution — a major concern for lawmakers like Garcia who represent areas long plagued by poor air quality.

Two weeks ago, proponents could have counted on two more Democratic votes in the Assembly for the package. But former Assemblyman Jimmy Gomez, D-Los Angeles, was recently sworn into Congress, a vacant seat held by Attorney General Xavier Becerra, and Jacqui Irwin, D-Thousand Oaks, was away for a week-long absence approved in January.

Under California’s complex cap-and-trade program, previously in place until 2020, refineries, power plants and factories must acquire permits for each ton of greenhouse gases they emit. The state gives millions of permits out for free, but industry buys others at auction and sometimes sells them to each other. The permits correspond to an overall level of allowable emissions that ratchets down each year.

In a concession to the oil industry condemned by grassroots environmental groups and opposed by local air quality management districts, the bill passed Monday prevents local air regulators from setting rules on greenhouse gas emissions outside of the cap-and-trade program.

Meanwhile, opponents on the right, including some Republican senators, gave dire predictions for the effect of the program on gas prices and the pocketbooks of ordinary citizens.

But momentum swung quickly in favor of the climate-change package in recent days. In a key development Monday morning, a number of agricultural groups came out in favor of the proposal, and the Western Growers Association withdrew its opposition.

Many businesses view cap-and-trade as a less costly and more flexible way to achieve a tough carbon-emissions goal the Legislature approved last year — 40 percent below 1990 levels by 2030 — than direct regulation by air regulators.

No Republicans as of late last week had publicly committed to the bill, but their skepticism began to waver as they saw an opportunity to gain more control over the billions of dollars that could be raised at quarterly cap-and-trade auctions.

Ultimately, they negotiated the constitutional amendment — which still must be approved by California voters — that would in 2024 empower the minority party by requiring two-thirds approval for the auction proceeds spending plan. Currently, 25 percent of the proceeds go to the $64 billion high-speed rail project — a bullet train connecting San Francisco, the Central Valley and Los Angeles — another priority of the governor’s. Republican lawmakers are generally opposed to the project, and may use this new power to hinder high speed rail, though they must wait seven years to do so.

One of the Assembly Republicans voting “yes,” Devon Mathis, of Visalia, said he prayed with his pastor about it on Sunday as he agonized over how to vote on the extension of a program he called “the most politicized piece of legislation I have seen yet.”

Mathis opened by saying that “cap and trade sucks,” but that it was “reality” — and better than the alternative: direct regulation. The bill, he said, would give his neighbors and friends in the agriculture industry some measure of economic certainty.

“He says follow your heart,” Mathis said of his conversation with his pastor. “My heart tells me this is the right thing to do and all the politics and all the phone calls and all the B.S. … My job is to have the backs of my friends and my neighbors who elected me in the first place. ”

Who was for it: Business groups including the California Chamber of Commerce, Pacific Gas & Electric, the Bay Area Council and the Silicon Valley Leadership Group are supporting the measure, as are mainstream environmental groups such as the Natural Resources Defense Council and the Environmental Defense Fund, which say the cap-and-trade program needs to be extended now to strengthen the program that has been clouded by uncertainty and give a measure of certainty to businesses. Several agricultural groups, including the California Farm Bureau and the Agricultural Council of California, announced their support at a hearing Monday morning. A tax-break extension for manufacturers garnered backing from that sector.

Who was opposed: Grass-roots groups seeking “environmental justice” for poor and working-class areas hit hard by air pollution say the bill includes too many giveaways to the oil industry, from free permits to emit carbon to limits on local regulation that the industry demanded. Local air districts are opposed, as the bill would take away their ability to set additional rules to limit carbon dioxide emissions outside of the cap-and-trade program. They could still limit toxic contaminants and particulates associated with asthma, but not greenhouse gases. And Republicans in Congress, including House Majority Leader Kevin McCarthy and other representatives from California, are urging their counterparts in Sacramento to sink the extension, arguing it would increase energy and gas costs for consumers.