SACRAMENTO — A contentious, intra-party dispute over a Republican lawmaker who helped propel a bipartisan climate bill to victory last month is underscoring just how hard it is for the GOP to find a direction in politically progressive California.

Assembly Republican Leader Chad Mayes, R-Yucca Valley, has come under withering attack from party stalwarts who say he sold out Republican values by supporting Gov. Jerry Brown’s plan to limit global-warming greenhouse gases. They are insisting on his ouster — even though powerful business interests supported the deal and a growing number of Californians want action to slow climate change.

Related Articles Opinion: Richmond needs to end its toxic relationship with Chevron

Editorial: Approve Measure T, preserve and protect open space

Manjoo: Clean air was once an achievable political goal

Walters: Newsom’s battle against climate change vs. reality

Climate is not weather: Trump continues to get the two conflated In taking that stance, California GOP leaders are in line with climate change-skeptical counterparts across the country. But Mayes and like-minded Republicans insist their opponents are ensuring the party’s irrelevance at home.

“Change for us, as California Republicans, is an absolute necessity,” Mayes said in a news conference Monday, hours before the Assembly Republican Caucus was set to discuss his fate. “It is an imperative. And if we don’t, we are going to die.”

On Monday evening, Mayes beat back an immediate leadership challenge after a vote to remove him from the post failed by three votes. But the matter is not behind him, as the Assembly Republicans decided to hold an open election next week. Mayes plans to run, his spokesman said.

No one argues that the California GOP is in good shape. It has seen its proportion of voters slide to 25.9 percent — nearly 10 points below where it was in 1999. About 44.8 percent of voters are registered as Democrats, 24.5 percent aren’t affiliated with any party and 4.9 percent are third-party voters, according to data from the Secretary of State’s Office.

The GOP’s own statewide public opinion poll from May 2016 found that 75 percent or more independents, Latinos, Asian-Americans, millennials and women agreed that “stopping global warming is very important, even if it means less economic growth,” according to a presentation Mayes delivered Friday to the California GOP’s board of directors. And a poll last month by the Public Policy Institute of California found overwhelming support for a requirement pending in the Legislature that 100 percent of the state’s electricity come from renewable sources like wind or solar power by 2045.

To Republican strategist Mike Madrid, who said he has spent more than 20 years trying to help the party expand its base, the party’s action against Mayes is symptomatic of its struggle to adapt.

“It’s the party’s inability to get outside of its own death spiral,” he said. “This is California. Even the Republican base wants some action on climate change. It’s bad foreboding that the Republican Party is looking to remove a leader who is trying to engage on these issues.”

But Harmeet Dhillon, the Republican national committeewoman who led the charge for Mayes’ removal, said the assemblyman’s leadership — and failure to offer “a conservative alternative to a bad bill” — is the problem.

“This is not about the future of the party, much as Chad Mayes would like to look at polls and fantasize that the future of the party would involve becoming more like Democrats,” Dhillon said. “You do not, as a minority party, win voters by becoming like the other party. They have authentic left-wing Democrats in Sacramento. They don’t need fake ones.”

Nationally, the GOP has resisted taking action to combat climate change. But, although Mayes has said publicly that he doesn’t know whether he buys the scientific consensus about global warming, he acknowledges that public opinion is undeniable. “We’ve got to believe that climate change is real because that’s what Californians believe,” he said.

In July, Mayes helped negotiate an extension of cap-and-trade, a landmark state program launched in 2013 in which industry essentially pays to pollute by acquiring an ever-shrinking number of permits to emit carbon. The Republican leader was key to the bill’s passage, leading six other members of his caucus to support it. Seven of the Assembly’s 25 Republicans and a lone Senate Republican voted to extend the program through 2030.

The California Chamber of Commerce, Big Oil, the agriculture lobby and other major industry groups supported the bill, which included tax breaks and other sweeteners for business. While some of those groups previously fought cap-and-trade, state lawmakers last year set an aggressive carbon-emissions goal for 2030: reducing emissions to 40 percent below 1990 levels. Cap-and-trade, a market-based program, is considered less costly to businesses than a carbon tax or other means to reach that goal.

But many party activists decried the Assembly Republicans’ support for what they describe as a “tax scheme,” and the furor did not subside during the month-long summer recess.

On Friday night, the California Republican Party’s board of directors voted 13-7 in favor of a resolution from Dhillon that called for Mayes to step down or be replaced, “given the uproar over recent decisions and actions by (Mayes) and the fact that those decisions and actions have acted to divide the California Republican Party.”

Supporters cheered Dhillon’s actions on social media, but not all of her fellow board members agreed. Sue Caro, the regional vice chairwoman for the Bay Area who voted against the motion, said she was disappointed in the ugly dispute, which she sees as “a generational civil war inside the party.”

“I’m sorry that this is going on,” she said. “I don’t think it was an appropriate thing for us to vote on.”

Assemblywoman Melissa Melendez, a conservative from Riverside County whose sharp criticism of the cap-and-trade deal landed her in the Capitol’s infamously tiny office known as “The Dog House,” announced Thursday that she would run to replace Mayes. Assemblyman Jay Obernolte, a Republican from Big Bear Lake, also has been meeting with caucus members about taking the position if Mayes leaves or is forced out.

George Shultz, an economist and statesman who held Cabinet posts under Republican presidents Richard Nixon and Ronald Reagan, noted Monday that the party has a long history of environmental stewardship that dates back to Theodore Roosevelt, a conservationist. He supported the bipartisan cap-and-trade deal and views it as part of that legacy.

“I think it is more and more obvious to everybody that the climate is changing and we should do something about it,” said Shultz, a distinguished fellow at Stanford’s Hoover Institution, in an interview Monday.

Asked about the party’s backlash against Mayes for supporting the legislation, Shultz said, “I think they will learn that it’s a mistake.”