SAN FRANCISCO — Final yr, with pandemic lockdowns within the rearview mirror, Complete Meals Market made a guess on a gritty San Francisco neighborhood. The high-end grocery store chain opened an enormous flagship retailer in part of town that’s dwelling to each tech firms like Twitter and open-air drug dealing.

However the retailer was quickly confronted head-on with lots of the issues plaguing the realm. Folks threatened staff with weapons, knives and sticks. They flung meals, screamed, fought and tried to defecate on the ground, in keeping with data of 568 emergency calls over 13 months, many depicting scenes of mayhem.

“Male w/machete is again,” the report on one 911 name states. “One other safety guard was simply assaulted,” one other says. A person with a four-inch knife attacked a number of safety guards, then sprayed retailer staff with foam from a fireplace extinguisher, in keeping with a 3rd.

In September, a 30-year-old man died within the rest room from an overdose of fentanyl, a extremely potent opioid, and methamphetamine.

When Complete Meals introduced in mid-April that it was closing the shop, citing the security of its staff, many in San Francisco noticed it as a illustration of a few of the metropolis’s most intractable issues: property crimes like shoplifting and automotive break-ins, an entrenched community of sellers promoting fentanyl and different illicit medication and other people affected by untreated psychological sickness wandering the streets.

The closure additionally gave the impression to be the newest indicator of San Francisco’s faltering financial prospects, offering extra grist for an ongoing debate over the place town is headed after tying its destiny to the tech trade. The Complete Meals was speculated to cater to tech employees and different professionals, a part of a long-term redevelopment plan downtown. However the retailer fell sufferer to a grinding decline within the metropolis’s middle that started with the pandemic and will proceed for years as firms vacate places of work due to distant work.

In a metropolis well-known for its boom-and-bust cycles, San Francisco’s continued hunch has left residents in a bitter temper, offended at metropolis leaders and ready for the sparks of revitalization. Now, largely as a result of the tech trade has so wholeheartedly embraced work-from-home, exercise in San Francisco’s downtown stays at roughly a 3rd of prepandemic ranges — decrease than in about 50 different main cities, in keeping with one new examine that used cellphone knowledge as a measure.

“That is going to be a really gradual restoration,” Effi Shoua mentioned this month from behind his desk on the downtown nice artwork gallery he owns in Union Sq.. The realm is a chief spot for vacationers, who’ve been steadily returning to town, a brilliant spot and a distinction to the 26 % emptiness fee of downtown places of work.

Many retailers are frightened a few domino impact of economic failures if workplace employees are completely absent for about half of the week, whereas individuals utilizing medication, going by psychological crises or residing on the road stay extra seen than ever.

The affect on town’s price range is critical, too: Workplace-based industries account for almost three quarters of town’s gross home product. After years of surpluses, the federal government now forecasts a $780 million deficit within the upcoming two fiscal years — roughly a 6 % lower in its normal fund, in keeping with the mayor’s workplace.

Metropolis officers say they’re looking for methods to diversify the economic system and to scale back homelessness and drug dealing. They understand that a few of the largest native employers, Huge Tech firms, is not going to be towing San Francisco from its financial shoals. Twitter, Google, Fb and Salesforce, all of which have places of work within the metropolis, have laid off hundreds of employees.

San Francisco leaders level out that town has rebounded repeatedly, together with after the near-collapse of the tech trade in 2000 and the nationwide recession about eight years later.

“We’ve been counted out earlier than, and there have been others who’ve tried to suggest as a result of issues aren’t taking place as quick or the best way that they suppose it ought to occur, that it’s over,” London Breed, town’s mayor, mentioned in an interview.

Within the famously liberal metropolis, the place Republicans make up simply 7 % of the citizens, average Democrats like Mayor Breed are calling for aggressive steps to handle public security considerations whereas progressive voices decry law-and-order methods as kneejerk responses that trample on the weak.

Metropolis leaders face some limitations. A federal decide in April decided that San Francisco can not clear homeless individuals from public areas as a result of it has not achieved sufficient to offer shelter. Mayor Breed is backing payments within the State Legislature that may make it simpler to pressure mentally unwell individuals into remedy. The mayor has additionally proposed addressing homelessness by constructing extra: slashing the allowing course of for building with the objective of constructing 83,000 further houses and flats — a 20 % improve from town’s present whole housing inventory — in eight years.

Despite the fact that the downtown is plastered with “for lease” indicators, town’s unemployment fee is beneath 3 % and the mayor and different officers say the engineering expertise pool stays town’s high asset. And there may be rather more to San Francisco than its downtown. It has at all times been a constellation of very totally different neighborhoods, a few of which have only a few of the social ills that afflict the realm close to the closed Complete Meals.

Officers add that the downtown could finally emerge extra resilient if it attracts industries like life sciences and bio-tech whose staff nonetheless want work area. There’s development within the tech trade, too: The event of synthetic intelligence, which guarantees to rework the best way that individuals reside and work, is centered in San Francisco.

Garry Tan, the president of Y Combinator, a distinguished venture-capital firm, says he sees indicators of renewal in San Francisco. “It’s the gold rush over and over and over,” he mentioned.

Mr. Tan is a part of a technology of tech employees who’re extra assertive of their calls for on metropolis officers, unafraid to take sides within the metropolis’s internecine politics and funding organizations that press for extra emphasis on public security.

“Now the narrative on the market for a few of the founders in our group is, I’m unsure if I really feel secure right here. I’m unsure if I wish to keep right here. The standard of life points are the query. Can I increase a household right here?”

In early April, some tech leaders seized upon the current deadly stabbing downtown of Bob Lee, a distinguished trade government, as an alarming signal that the downtown was unsafe. However an acquaintance was later accused of homicide, and San Francisco’s homicide fee is kind of low in contrast with different main cities. Total, police statistics present fewer property and violent crimes in 2022 than in 2018, earlier than the pandemic started.

Nonetheless, Invoice Scott, town’s police chief, says many residents complain that they really feel much less secure, and the open-air drug use, a lot of it tied to fentanyl, is a serious contributor.

Matt Dorsey, a member of the board of supervisors who lives steps away from the shuttered Complete Meals, mentioned current elections had signaled a shift in voter priorities. He pointed to final yr’s recall of town’s progressive district lawyer, Chesa Boudin, who was changed by a prosecutor who vowed to be harder on crime.

“San Francisco is within the midst of a voter revolt on public security,” Mr. Dorsey mentioned. In a ballot performed by the San Francisco Chronicle in September, almost two-thirds of respondents mentioned life within the metropolis was worse off than once they moved right here.

The brand new district lawyer, Brooke Jenkins, has begun prosecuting extra drug crimes than Mr. Boudin, however the metropolis skilled a 40 % bounce in deadly overdoses within the first quarter in contrast with the identical interval final yr.  Citing that statistic, Gov. Gavin Newsom on Friday licensed an antidrug activity pressure in San Francisco that may embody members of the California Nationwide Guard and California Freeway Patrol.

The mayor and the police chief have vowed to rent a whole bunch of further officers, which might increase the pressure by greater than one-fourth, a troublesome proposition when legislation enforcement companies nationwide are going through shortages.

Not everyone seems to be on board with that.

Dean Preston, a member of the board of supervisors who was re-elected in 2020 on a Democratic Socialist platform, is towards growing police staffing and believes the concept of a shift within the citizens’s view about public security is overstated.

“There’s been an enormous propaganda effort to vary public opinion round policing and public security,” he mentioned.

Mr. Preston makes use of his district for example of how uneven the pandemic restoration has been. Some areas like Japantown and Haight Ashbury are thriving, he mentioned. Others just like the Tenderloin, which is adjoining to the shuttered Complete Meals, are beset by drug dealing and homelessness.

One of many subsequent huge assessments for downtown could be this summer time’s anticipated opening of an Ikea retailer not removed from the Complete Meals web site.

Police described theft as rampant at Complete Meals, with thieves strolling out with armfuls of alcohol, not less than in the beginning. After 250 procuring hand baskets have been stolen, the corporate restocked with 50 extra. These went lacking, too.

In the course of the retailer’s 13 months in operation, not less than 14 individuals have been arrested, together with on expenses of grand theft and battery, in keeping with official stories. Chief Scott mentioned that plainclothes officers have been despatched there and safety improved over time, however seemingly not sufficient for the corporate.

On a current chilly night time throughout from the shuttered retailer, Joseph Peterson, a former building employee who misplaced each of his legs to diabetes and is homeless, rolled down the sidewalk in his wheelchair. Mr. Peterson may see the two,000-unit Trinity flats, the high-end advanced that Complete Meals had hoped can be its buyer base. Throughout the intersection, safety guards stood sentry in entrance of the Orpheum Theater, the place “Fairly Lady: The Musical” was taking part in. A number of dozen steps away, sellers peddled fentanyl and crystal meth.

Mr. Peterson mentioned he understood why Complete Meals had closed the shop.

“Folks stored stealing from it,” he mentioned. He, too, had taken macaroni and cheese and hen from the recent meals bar quite a few occasions, he mentioned. However he made a distinction. Different individuals stole from the shop as a result of they wished to resell what they took.

“I simply stole to eat,” he mentioned.

Alain Delaquérière, Susan C. Beachy and Kitty Bennett contributed analysis.