SAN FRANCISCO — In a city where being called conservative can be an insult and where partisanship is often left versus further left, the removal of an African-American interim mayor, and her replacement by a white, male venture capitalist, was bound to set off an uproar.

The appointment of Mark Farrell, the venture capitalist, and the ouster of London Breed, the interim mayor, by the San Francisco Board of Supervisors on Tuesday in some ways exemplified a larger battle for the soul of San Francisco. In just seven years the median price of a home here has nearly doubled, to $1.3 million — a transformation, driven by the riches of the tech industry, that continues to push out longtime residents, many of them nonwhites.

But what may seem on the surface to be a familiar clash between tech and those threatened by its rise is in fact a moment full of complicated alliances and seeming contradictions.

Mr. Farrell, who is the managing director of Thayer Ventures, a firm that invests in technology companies, was backed by a faction that has been critical of tech companies’ influence on San Francisco.