On Friday, Mayor London Breed appointed the candidate she endorsed as interim DA, former prosecutor Suzy Loftus, to replace Gascón. The surprise announcement sparked a backlash from other candidates and their supporters. Protesters decrying election interference and Loftus’ time on the city's Police Commission stormed Portsmouth Square, where the announcement was going to be made.

Later, at a Chinese restaurant where the event was hastily moved, Breed defended her choice.

“I have confidence in Suzy Loftus and so that's why I made the decision,” she said. “If there was anyone else that I thought was better than what she would bring to the table then they would be the person that I would identify today.”

The move further cements Loftus as the establishment candidate. Although all four candidates are liberal Democrats, Loftus has the sole endorsement of the San Francisco Democratic Party, while San Francisco Deputy Public Defender Chesa Boudin has been embraced by national reform-minded activists who also helped push unorthodox, progressive candidates to victory in cities like Philadelphia and Chicago.

Nancy Tung, a career prosecutor, is running as the most traditional candidate; and Leif Dautch, a deputy attorney general for the state, is trying to straddle the political line between progressivism and public safety.

Now, city voters can weigh in. Early voting started on Monday at two election centers and by mail, and will continue until the Nov. 5 election.

St. Mary’s College political science professor Corey Cook said the race shows how the ground has shifted around criminal justice since the 1990s.

“The district attorneys were about locking people up and would tout their high conviction rates and their success at getting people incarcerated,” he said. “That has been replaced in a lot of jurisdictions with, 'What are the diversion efforts that you have so people aren't going to jail?' ”

San Francisco is a city known for its progressivism but is also struggling with street crime, auto burglaries and a homeless crisis.

“It's an interesting time to be running for DA mostly because of the issues that are confronting San Francisco right now," Nancy Tung said. "It's this confluence of crime, homelessness, mental health, drug addiction, open-air drug use. And just this feeling of like where is San Francisco? Where are we going?”

Tung is a longtime San Francisco prosecutor who left to work for Alameda County over frustrations with Gascón’s leadership. She emphasizes her experience as a prosecutor on the campaign trail, promising to crack down on organized crime as a way to tackle drug sales and other street issues.

“We have not done enough to really partner with our local law enforcement agencies to attack these issues around organized crime,” Tung said.

The four district attorney hopefuls agree on many issues. They all say they support reforming the cash bail system and keeping San Francisco a sanctuary city. They agree that the city needs to do more to divert people from jail into drug and mental health treatment. And they all contend that Gascón's leadership was lacking.

Their differences lie in their experience and approach to the job.

Loftus is a former San Francisco Police Commission president and longtime deputy of former DA, now U.S. senator, Kamala Harris. Loftus said she is seeking to strike a balance between rehabilitation and accountability.

“There's many different ways that we can divert people out of the system while we are handling the cases that we need to and prosecuting the individuals who do need to be prosecuted,” she said. “You need an experienced, competent DA who knows the difference.”

Boudin is an outsider in this group and a so-called “child of the left” — his parents are progressive radicals who were sent to prison when he was a baby.

Boudin says that experience, as well as his work as a defense attorney, gives him a unique perspective on restorative justice and serving crime victims.

In instances of crime, he says, “We need to start by saying to the victim, 'Do you want this person to be punished or do you want us to focus resources and accountability on ensuring that this person fixes your window or does something else to make right the harm that they caused in your community?' ”