San Francisco is a notoriously difficult city for restaurants, between rising costs, staffing shortages and stiff competition.

Add extortion to the list of challenges.

On Thursday, District Attorney George Gascón issued a public warning about an email extortion operation directed at San Francisco restaurants. Several local chefs have said perpetrators threaten to spread negative information about their restaurants unless they’re paid money.

Serpentine in the Dogpatch neighborhood received an email from a person calling herself a “PR manager.” The email, which carried the subject line “Reputation,” said the sender, who gave her name as Natasha Nixon, was hired by one of Serpentine’s competitors to share negative information, such as “awful photos of the food containing hair and insects.”

“I don't want to hurt your restaurant reputation therefore I offer you to have a deal,” the email reads. “I’ll refuse to fulfill this order if you compensate me the amount that I'll lose in case of failure to fulfill order.”

The letter went on to say that if Serpentine chef Tom Halvorson paid the requested amount, she would name the competitor “so you can report him to the police.”

Halvorson, who was given two days to respond, notified law enforcement.

Kim Alter of Hayes Valley’s Nightbird restaurant posted a photo of a similar letter on Instagram last week, threatening to share a negative press release with “300 major news and media outlets such as Fox, NBC, CBS, ABC.”

Gascón called the extortion attempts “egregious” and said local restaurants and business owners can prevent similar operations by identifying them “before they can even occur.”

Cyberextortion is a felony in California, punishable by two to four years in jail and up to $10,000 in fines, according to the California penal code.

Justin Phillips is a San Francisco Chronicle staff writer. Email: jphillips@sfchronicle.com Twitter: @JustMrPhillips