When the clock struck noon, the masks came off.

It was Nov. 21, 1918, and San Francisco residents gathered in the streets to celebrate not only the recent end of World War I and the Allies’ victory, but also the end of an onerous ordinance that shut down the city and required all residents and visitors to wear face coverings in public to stop the spread of the so-called Spanish flu.

A blaring whistle alerted gratified residents across the city and, as the San Francisco Chronicle reported at the time, "the sidewalks and runnels were strewn with the relics of a torturous month," despite warnings from the health department to maintain face coverings. As celebrations continued and residents flocked to theaters, restaurants and other public spaces soon thereafter, city officials would soon learn their problems were far from over.

Now, amid the coronavirus pandemic, as President Donald Trump urges the reopening of the country and some states, such as Georgia, move to resume normal business even as new cases emerge, how officials acted during the 1918 flu pandemic, specifically in cities such as San Francisco, offers a cautionary tale about the dangers of doing so too soon.

Alex Navarro, the assistant director of the Center for the History of Medicine at the University of Michigan, which detailed historical accounts of the 1918-19 flu pandemic in 43 cities, told NBC News in a phone interview that officials often acted quickly at the time but restrictions were eased to varying degrees.

"There was a lot of pressure in pretty much all of these American cities to reopen," said Navarro, whose research was done in conjunction with the Centers for Disease Control and Prevention. "When they removed those restrictions too soon, then many cities saw a resurgence in cases."

Download the NBC News app for full coverage of the coronavirus outbreak

The center's research found that cities that used "early, sustained and layered" practices such as social distancing, closing public events and stay-at-home orders "fared better than those that did not."

'A lot of stock in masks'

Just two months earlier, in September, the first case of the so-called Spanish flu was identified in San Francisco and city health officials sprung into action.

Dr. William C. Hassler, the city’s health officer, ordered the local man who apparently brought the disease to the city after a trip to Chicago into quarantine to stop the disease from finding another human host, according to the center's research of reported accounts.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

But it was too late as the virus had already begun to make its way through the city. By mid-October, the cases jumped from 169 to 2,000 in just one week. Later that month, Mayor James Rolph put in place social distancing practices and met with Hassler, other health officials, local business owners as well as officials from the federal government to discuss a plan to close the city.

Some officials demurred at the idea, worried about damage to the city’s economy and the risk of causing public panic. Eventually, on Oct. 18, the city voted to shut down "all places of public amusement."

The congregation praying on the steps of the Cathedral of Saint Mary of the Assumption, where they gathered to hear mass and pray during the influenza epidemic, San Francisco, California, 1918. Hulton Archive / Getty Images file

City officials also strongly advocated for face coverings, which were at first optional and soon required by a mayoral order — the country's first at the time, Navarro said.

"They were the one city that put a lot of stock in masks," he said.

With the pandemic still raging across the globe during World War I, the mask also became a symbol of "wartime patriotism."

"The man or woman or child who will not wear a mask now is a dangerous slacker," a public service announcement from the American Red Cross said at the time, according to Navarro’s research.

That, however, did not stop people from defying the order — 110 people were arrested and given a $5 fine in one day in October shortly after the measure went into place, improperly wearing a mask or not wearing one entirely, according to the center's research. Over time, the jails were overcrowded with people failing to adhere to the rules. However, most cases were later dismissed.

By the end of October, there were 20,000 cases and more than 1,000 deaths. However, as the days went on, the city saw a dip in newly reported cases, which prompted officials to begin to reopen the city and rescind the mask order. By the end of November, officials believed the city had stabilized.

Court is held in open air during the influenza epidemic in San Francisco, 1918. Bettmann Archive / Getty Images file

'They were flattening that curve'

But three weeks after that celebration of removing their masks, the city saw a dramatic resurgence. Officials at first rejected the idea of reopening the city and suggested residents could voluntarily wear face coverings.

But shortly after the New Year in 1919, the city was hit with 600 new cases in one day, prompting the Board of Supervisors to re-enact the mandatory mask ordinance. Protests against the mandate eventually led to the formation of the Anti-Mask League. The detractors eventually got their way when the order was lifted in February.

San Francisco’s ambivalence to quarantine measures ran counter to other U.S. cities, though. Navarro said Los Angeles, for instance, implemented strict social distancing and face coverings about a week before San Francisco did and its measures stayed in place for weeks longer.

Navarro said that many cities often became complacent once they saw a dip in cases, and when a resurgence happens residents often question the public health guidance.

"They were flattening that curve; they just weren't realizing it," Navarro said. "A lot of people thought, ‘Well, what did we go through that for? It did have an impact, they just didn't know it."

As Dr. Anthony Fauci, the nation's top infectious disease expert, put it in March, "If it looks like you're overreacting, you're probably doing the right thing."

Back during the Spanish flu, San Fransisco's failure to take swift action and the decision to ease restrictions after only a few weeks had huge ramifications. With 45,000 cases and more than 3,000 deaths, the city was reported to have been one of, if not, the hardest-hit big city.

Roughly a century later, the San Francisco Bay Area imposed the nation's first stay-at-home order and other restrictions when coronavirus cases were rapidly growing, placing a spotlight on its pandemic response again. Those aggressive actions are credited with saving lives, avoiding the scale of the tragedy found in New York City.

Mayor London Breed said she took heed of history and implemented an order last week requiring anyone setting foot on the streets of San Francisco, outside their homes, to wear a face covering.

Starting today, people in San Francisco are required to wear face coverings at essential businesses, in public facilities, on transit, and while performing essential work.



This is not a replacement for staying home and physical distancing, but it is an important step for safety. — London Breed (@LondonBreed) April 17, 2020

Breed told MSNBC’s Chris Hayes in an appearance in mid-April that she has considered the city’s history with past pandemics, such as the HIV/AIDS crisis and the Spanish flu when deciding to ease restrictions.

"Just because San Francisco is being praised for flattening the curve, we're not there yet," she said. "And so we cannot let up just because for some reason we believe that we're in a better place."

Full coverage of the coronavirus outbreak