Republicans in California are stuck between a rock and a conservative base.

On the one hand, President Trump and his policies on tax and immigration are immensely popular with the party faithful. Some 80 percent of registered Republican voters in California approve of the president, according to recent polling, a fact that was clear in San Diego this weekend as the state GOP convened for its spring convention.

“Can President Trump count on you?” Iowa senator and Trump ally Joni Ernst asked the crowd in a speech Saturday. She was met with a wave of cheers. “I know that with your help,” she said, “what we can do is once again shock the nation like we did in 2016.”

WhatMatters: Your daily guide to ​California policy & politics.

But outside this oasis of “Make America Great Again” hats, Republicans in California are operating in hostile territory in this election year. The same poll found that 67 percent of all state voters disapprove of the president’s job performance. And the number of registered Republicans is at a historic low in the state—25 percent—and may soon be eclipsed by voters with no party preference at all.

As the Republican candidates for various offices plan for the top-two primary election, now only a month away, they’ll be walking a tightrope between a party base on the right and a broader group of voters, many of whom hope to punish the president and his party in a “blue wave” election. But party leaders say they’ve found the secret to this balancing act: Keep it local.

“You want to know why every word out of Democrats’ mouth[s] is ‘Donald Trump?’” said Jim Brulte, chairman of the California Republican Party. “Because they don’t want the voters of this state focusing on what’s happening here.”

What’s happening here in California, he said, includes the nation’s highest poverty rate, ever-escalating home prices and rising economic inequality and homelessness. He, and virtually every other Republican in attendance this weekend, took special aim at two policies recently enacted by the state Legislature: an increase in car fees and gasoline taxes, and the “sanctuary state” policy that limits local and state law-enforcement agencies’ cooperation with federal immigration authorities.

State Republican Party Chairman Jim Brulte talks to reporters at the weekend convention. Photo by Ben Christopher/CALmatters.

Last week, gax-tax opponents, including Republican gubernatorial candidate John Cox, submitted nearly 1 million signatures on petitions to put a repeal of the increase on the fall ballot. Republicans hope it will draw an outsized number of pocketbook-minded voters to the polls in November to vote for other Republican causes and candidates.

“This isn’t a Republican issue, this isn’t a Democratic issue—this is a people issue,” said Bill Essayli, who is running to defeat Democratic Assemblywoman Sabrina Cervantes in a Riverside County district and who has built his campaign largely around his opposition to the gas-tax hike.

California immigration policy has also been one of the most galvanizing issues for the party’s base this year, as city councils and county boards have passed ordinances against the sanctuary law or joined the Trump administration’s lawsuit against the state.

“I’m telling every candidate: When you run for office, you should come out…with ‘repeal the gas tax’ and ‘oppose the sanctuary state,’” said San Diego Republican Party Chairman Tony Krvaric. “There are other issues as well, but that’s a damn good place to start and have a conversation.”

He says that’s a winning strategy for state and local office, but also for Republicans scrambling to hold onto vulnerable congressional seats. By some measures, more than half of the 14 GOP-held districts in California are competitive this year. Krvaric says a focus on state-level policies will rev up right-of-center turnout, benefiting Republican candidates no matter their place on the ballot.

It’s a strategy that tests conflicting theories: The midterm elections will be a referendum on the president, as the first election after a presidential contest so often is, or all politics will be local in 2018, as Republicans hope.

In 2003, anti-tax activists were able to channel public anger over an increase in the state vehicle license fee in the recall of Democratic Gov. Gray Davis and the election of Republican Arnold Schwarzenegger. A decade earlier, the campaign to pass Proposition 187, intended to deny public services to undocumented immigrants, amid a broad fervor over illegal immigration helped propel Gov. Pete Wilson to re-election—even though it tarnished the Republican brand for many Latino voters.

But in every other respect, California Republicans are fighting an uphill battle. California has not elected a Republican to statewide office since 2006. In addition, the sitting president’s party has suffered an average loss of more than 20 seats in the House of Representatives in midterm elections since World War II. Those losses have tended to be bigger when the president was unpopular. In state and federal elections around the country since 2016, Democratic candidates have made strong gains.

Many at the convention had hoped to improve the party’s electoral chances by uniting behind one of the two leading GOP gubernatorial candidates, John Cox and Travis Allen. But neither man secured the 60 percent of the delegate vote needed for an endorsement.

And even on issues such as sanctuary policies, not every Republican is on board. Though 88 percent oppose California’s main sanctuary measure, Assemblyman Rocky Chávez of Oceanside, who is running for Congress and showed up toward the end of the convention, is one of the remaining 12 percent.

In January, Chávez was one a handful of current and former Republican lawmakers to announce the formation of New Way California, a group formed to press for more inclusive and environmentally friendly policies in the party.

“I don’t think we win by subtraction, we win by addition,” he said.

The group’s other founding members, Schwarzenegger and Assemblyman Chad Mayes, did not attend this weekend’s convention.

Asked how Republicans can win in California, Chávez, who hopes to succeed Rep. Darrell Issa, who is not running again, said: Know your race. In 2016, Issa’s district voted for Hillary Clinton by 7.5 points.

“My district is not some place like up in Chico or Bakersfield or the Imperial Valley,” Chávez said. “The guys running for governor, they’ve gotta look at the whole state and figure out how they’re going to get their votes.”