The vote to remove her as acting mayor came after hours of public testimony -- much of it very emotional and charged with racial undertones. As soon as it became apparent that the first African-American woman to lead San Francisco was being replaced by a white male representing some of the city's wealthiest neighborhoods, the board chambers erupted.

Some members of the audience, infuriated by the turn of events, chanted, "Shame, shame, shame."

"This is war!" some shouted as board members left the chambers.

Farrell initially secured the seat by a 7-2 vote, but faced a second vote when Supervisor Katy Tang withdrew her initial vote of support. In the end, Farrell took office with a 6-3 vote. He'll have to relinquish his seat on the board -- but gets to name his District 2 replacement.

After the vote, Farrell ducked out of the supervisors chambers and was sworn in as interim mayor by City Attorney Dennis Herrera around 9 p.m.

Asked whether her removal as acting mayor was due to underlying racism, Breed declined to say it was.

"I don't want to dwell on that particular element because it has sadly brought out the worst in some people," she said. "And so what I am trying to do as a leader in this city is bring out the best in people."

Farrell's appointment as interim mayor was delivered not by his allies on the Board of Supervisors' moderate faction but by the board's most progressive members, including Supervisors Aaron Peskin and Jane Kim, who is herself running for mayor. Their goal was to remove the political advantage Breed had as acting mayor in the June election -- and they did.

Former San Francisco Mayor Art Agnos, who for a while was in the running to be interim mayor himself, marveled at the political machinations that resulted in Farrell moving into Room 200.

"This was one of the best politically orchestrated maneuvers I've ever seen, that nobody expected but which will serve San Francisco very well," Agnos said.

During more than three hours of public testimony, several speakers referred to the outsized political influence of Ron Conway, a high-tech mogul who strongly backed both Breed and the late Mayor Lee.

In her remarks, which were at times tearful, Supervisor Hillary Ronen called Conway's influence in city politics "gross."

"There are white, rich men -- billionaires -- in this city that have steered the policies for the past mayoral administrations ... that have gotten us into the absolute mess that we are in today, where poor people and people of color cannot afford to live in the city," Ronen said.

"I hate to say it, but those same white men are enthusiastically supporting your candidacy, London Breed," she added. "They are threatening people if they don't support London Breed, saying that their careers will be ruined if they don't support London Breed. And that is not right. It's the grossest part of politics in America."

Many of Breed's supporters believed her success in the June election was closely tied to her remaining acting mayor. Now, the playing field is more level, giving candidates favored by progressives -- former state Sen. Mark Leno and Supervisor Jane Kim -- a better shot.