Suzy Loftus was sworn in Saturday morning as San Francisco’s interim district attorney, one day after the departure of George Gascón and 17 days before she faces off against three other candidates in the Nov. 5 election.

Mayor London Breed, saying she “needs a partner we can work with,” swore in Loftus, her preferred candidate in the election, at the district attorney’s office, joined by Loftus’ husband, mother and three children.

Asked if her 11th-hour appointment was a “tilting of the scales,” as the American Civil Liberties Union had said, Loftus replied that the suggestion she had received an unfair leg up in the election had merely “drawn more attention to this race.”

“Some of the traditional hallmarks of incumbency don’t exist,” she added. “There’s no incumbent on the ballot. ... Certainly there was an unexpected vacancy. It’s very unusual for the district attorney to step down in the way that he did (and) the timing that he did. The reality is, when that vacancy opened up and the mayor asked me to step up, that’s who I am.”

Gascón had led the office since his own dramatic appointment by then-Mayor Gavin Newsom in 2011 to replace Kamala Harris, who had been elected state attorney general. Gascón opted to step down to clear the way for a possible run for district attorney in Los Angeles, but didn’t think Breed would name an interim leader of the office before Nov. 5.

Breed said in appointing Loftus, “We don’t just leave an office open just because there’s an election coming up.”

But critics of the move — including supporters of candidates Chesa Boudin, Leif Dautch and Nancy Tung — called it an abuse of power that gave Loftus the status of incumbency in a wide-open race.

Loftus has been assistant chief legal counsel at the Sheriff’s Department and previously served as president of the Police Commission during a turbulent period of fatal police shootings in San Francisco. She worked under Harris in the attorney general’s office and at the district attorney’s office.

Boudin is an attorney in the public defender’s office and the most progressive candidate in the race. Tung has worked as a prosecutor for 16 years in the Bay Area, including 11 in San Francisco. Dautch manages a team of prosecutors in the attorney general’s office and has presided over the city’s Juvenile Probation Commission.

Evan Sernoffsky and Steve Rubenstein are San Francisco Chronicle staff writers. Email: esernoffsky@sfchronicle.com, srubenstein@sfchronicle.com Twitter: @EvanSernoffsky, @SteveRubeSF