SAN FRANCISCO — In this deeply liberal California city, frustration over crises around housing and homelessness is bringing some on the left a little further right.

At an upscale sushi restaurant, a few dozen members of the San Francisco Republican Party gathered on Tuesday night to watch the election results. Most did not want to talk about state or national politics, they wanted to keep it local.

The group largely supported the Republican candidate for governor, John H. Cox, whom President Trump had endorsed and who won a place on the ballot along with Gavin Newsom, a Democrat and a former San Francisco mayor. But among the longtime Republicans were some newcomers, drawn to the right over frustration with the city’s trifecta of very tangible crises: a large homeless population, record housing costs and a high rate of property crime.

“We’re the most beautiful city no one ever wants to come back to,” said Anna Coles, 36, a real estate agent who has lived in the city for 12 years.