Republicans as conservative as gubernatorial candidate Travis Allen are a fading breed in California and nearly extinct in San Francisco.

But Allen didn’t pull any punches Tuesday during an appearance at the University of San Francisco. There, in the sanctuary city he ridicules on the campaign trail as a squalid den of petty crime and lawless liberals, few Democrats west of the Sierra were spared the wrath of the three-term assemblyman from Huntington Beach (Orange County) during a free-wheeling on-stage discussion at USF with Politico’s Carla Marinucci.

Allen needs to do something to raise attention to his campaign. He is low on cash compared with his rivals, according to the most recent official fundraising reports, and trails Lt. Gov. Gavin Newsom (28 percent of likely voters), Rancho Santa Fe GOP businessman John Cox (16 percent) and former Los Angeles Mayor Antonio Villaraigosa (14 percent) with only 10 percent of the vote, according to a nonpartisan Public Policy Institute of California survey released last week. Only two candidates will advance from the June 5 primary to the general election in November.

Allen’s path to the general election requires capturing the state’s supporters of President Trump. And, much like the president, Allen tries to woo them with bare-knuckled political attacks on his opponents.

Start with Oakland Mayor Libby Schaaf, who Allen said “should be arrested” for issuing a public warning of federal immigration raids last month. To Allen, that was “felony aiding and abetting criminals.”

He said Gov. Jerry Brown has “done absolutely nothing” in four terms as governor, except lie to Californians about promising not to raise taxes without voter approval. And he believes — like Trump — that there was rampant voter fraud in California, even though there has been no evidence of any. Allen said Brown and Secretary of State Alex Padilla “swept (the evidence) under the rug” — without being specific how they allegedly did so.

He mocked the “absolute nonsense” of Attorney General Xavier Becerra’s move to sue the federal government for its plan to include a question about citizenship status on the next federal census. Californians, Allen said, “have a right to know who is living in their state.” Allen also ripped Becerra — whom he refers to as “the criminal attorney general” — for his support of a state law that limits an employer’s cooperation with immigration authorities.

“This is no different than a Mafia boss trying to intimidate witnesses not to talk to the feds,” Allen said.

On the issues, it’s hard to get to the right of Allen. To him, “the verdict is still out on climate change” as “it will take quite some time for the science to be settled on this.” If elected, he promised to eliminate entire state departments like the California Air Resources Board, which he said has “outlived its original mandate” and kill Brown’s pet high-speed rail project.

Trump, on the other hand, can do little wrong. Not even Trump’s alleged affair with a porn star — and the alleged $130,000 hush money payoff to her — could dampen Allen’s enthusiasm.

“I don’t think that anybody is perfect,” Allen said. “I have no idea what Donald Trump was doing on his personal time before he was president of the United States. This has no bearing on his ability to lead our country.”