Lincoln Mitchell teaches in the political science department at Columbia University. His most recent book is "San Francisco Year Zero: Political Upheaval Punk Rock and a Third Place Baseball Team." (Rutgers University Press, 2019) Follow him on Twitter @LincolnMitchell . The opinions expressed here are his own. Read more opinion at CNN.

(CNN) Just a few months ago, conservatives were ridiculing San Francisco as a failed experiment in left-wing governance, while progressives decried the city's leadership for making the city unaffordable by ceding too much influence to new tech money. When Covid-19 began to infect the US, many expected the densely populated city to be hit badly. I worried about the city where I'd grown up. I frequently checked in with my mother and old friends there. Within a few days, the tables turned -- they were worrying about me in Manhattan.

The story of how two San Francisco mayors -- one, London Breed, who currently holds that job, and another, Gavin Newsom, who has moved on to become California's governor -- have gotten out in front of this pandemic, suggests that San Francisco may have been doing something right all along. The two, in their respective roles, implemented shelter in place policies and shut down non-essential activities well before much of the rest of the country, likely saving thousands of lives

Outside of San Francisco, Breed, who was elected in 2018, and Newsom, who served as mayor from 2004-2010 and was elected governor in 2018, are seen by many as far-left politicians. After all, Newsom was the first mayor in the country to make same-sex marriages legal back in 2004, while Breed is assumed to be a San Francisco liberal -- not least because she is an African American woman. The real story is more complicated.

Both became mayor by running as centrists, defeating opponents from the left and following a path initially blazed by another mayor, Dianne Feinstein, 40 years ago: liberal on social issues while remaining close to powerful business interests.

My radical friends and I, who grew up hanging out in the Haight-Ashbury district, who remember that dark day when progressive political heroes George Moscone and Harvey Milk were assassinated, who watched the Dead Kennedys play at those 1980s "Rock Against Reagan" concerts and who feel great pride whenever our town is attacked on Fox News, wouldn't have voted for Breed or Newsom for mayor, but many of our (slightly) more conservative parents and friends did.

Art Agnos, a San Francisco progressive to the core, knows a bit about steering San Francisco through crises. He was mayor in 1989 when the Loma Prieta earthquake shook the city just as the San Francisco Giants were about to host the Oakland A's in a World Series game . More than 60 people died; almost 3,800 were injured, thousands were displaced and an estimated $6 billion worth of property was damaged.

Agnos, broadly praised for his leadership at that time, assessed Breed and Newsom's handling of this pandemic. "They're doing a superb job," he told me. "The mayor... the board of supervisors have been way ahead of the rest of the country ... Gavin Newsom has been right there with his leadership."

Alluding to the 1989 earthquake as well as the AIDS epidemic and the assassinations of Moscone and Milk, Agnos added that it was "no accident that San Francisco, and the governor who comes from San Francisco, demonstrate this kind of leadership, because San Francisco has a history of dealing successfully with crises."

Covid-19's outbreak in the Chinese city of Wuhan has led some to blame China for the pandemic, which has contributed to racist attacks against Asian Americans. However, in San Francisco officials tamped this down by paying attention to their Chinese American constituents and to social service providers, civic organizations and business leaders in Chinatown.

For example, Aaron Peskin, a member of the board of supervisors whose district includes Chinatown, told me that San Francisco's Chinese American community was far ahead of the rest of this city in its fear of the pandemic, with "large amounts" of people on Chinatown's streets wearing masks by early February and that they worked with local organization and health care providers in that community, "holding press conferences and giving out basic information about hand-washing the first week in February."

This led San Francisco's elected officials to begin to focus on the coronavirus threat before most of the rest of the country. Thus, while the constant movement of people between San Francisco and China, including Wuhan, which until late January was a direct flight away from San Francisco, made San Francisco more vulnerable, it also gave decision makers access to early intelligence and information.

There is more to San Francisco and California's success than simply reading the signals from Chinatown.

All San Francisco mayors must balance the city's progressive character with the necessity of creating a business friendly environment, its irreverent and counterculture gestalt with the influence of the data-intensive tech industry.

These factors led to the Bay Area becoming the heart of the computer revolution while spurring a rare style of governance that has made it easier, for example, for public health experts from institutions like UC San Francisco, Stanford and UC Berkeley to get immediate access to decision makers as the crisis loomed -- perhaps most notably Gov. Newsom.

Get our free weekly newsletter Sign up for CNN Opinion's new newsletter. Join us on Twitter and Facebook

Dr. Michael Mason, the co-chair for geriatric medicine for Kaiser Permanente for Northern California, told me Breed was quick to recognize public health recommendations that "some form of a self-quarantine" was the best option, given the absence of a vaccine or treatment for Covid-19.

Mason, who was involved in the planning in the Bay area, said Newsom "listened to what the CDC and the NIH were saying... They gave him guidance and he actually listened." This rapid response contrasted with New York leaders like Gov. Andrew Cuomo and New York City Mayor Bill de Blasio. Former CDC director Tom Frieden says their initial slowness to heed shutdown recommendations during the early days of the pandemic probably led to many unnecessary deaths.

While the California governor and the San Francisco mayor, along with thousands of health professionals, essential and government workers, deserve credit for their initial success in fighting this pandemic, this crisis is far from over.

Newsom, who clearly is eyeing a future White House run, and Breed, who must be aware that being mayor of San Francisco can lead to higher office, need to remain focused on the problem and not declare victory too early. This will require tolerance, cooperation, an understanding of data and a respect for expertise.

Suddenly, those San Francisco values aren't a punchline anymore.