SAN FRANCISCO — The global pandemic and protests that triggered widespread curfews have added a new layer of risk for people conducting the essential work of delivering food or groceries as gig workers.

That was made clear by a video posted to social media earlier this month showing a food courier holding an orange delivery bag, his bicycle lying on its side, as he pleads with New York Police Department officers not to arrest him. By the end of the clip, the courier for delivery service Caviar, an essential worker by the city’s definition, is in handcuffs, and an officer is rifling through his delivery bag.

“Are you serious? Look, look, look, look! I’m not even doing anything," he says, as an officer replies that he’s in violation of New York City’s curfew order. “It tells me on the app that ... I can show you guys you can’t arrest me. Are you serious? Are you serious? For real?”

The pandemic and nationwide demonstrations over the killing of George Floyd in Minneapolis police custody have highlighted threats to delivery drivers of being arrested by authorities or charged with misdemeanor offenses for carrying out orders exactly as the companies advise. Apps such as Caviar, Uber and Instacart, which match drivers and couriers with orders for food or other deliveries, have largely kept operating during the curfews. And the drivers are sometimes unaware of the risks of accepting orders from the apps.

Those newer risks build on an already unseen pool of liability faced by most of these independent contractors, who are not entitled to the benefits available to traditional employees in what the companies say is an exchange for flexibility. Instead, they are responsible for their own health care and vehicle maintenance — with little protection legally if they undertake company-sanctioned activities later found to be illegal.

The risk can manifest in different ways: traffic tickets, higher insurance rates, misdemeanor citations and even arrest.

“There’s always been a certain level of risk,” said Alex Rosenblat, a technology researcher who wrote “Uberland: How Algorithms Are Rewriting the Rules of Work.” “Whereas the employee has some coverage, there are laws in place that say you have to provide a safe workplace,” she said. But “the independent contractor is agreeing to take on all the risks on their own.”

Companies such as Uber, Lyft, DoorDash, Caviar and Instacart say that the safety of those working for them is their priority and that they have offered support to some caught in the recent legal and regulatory fray by their policies, while trying to minimize their risk.

DoorDash, for example, says it took steps to protect workers at the pandemic’s onset: instituting contactless delivery to minimize exposure between couriers and customers, distributing face masks, hand sanitizer and gloves and creating a financial-assistance program for couriers who test positive for covid-19, are under quarantine orders or qualify under other pandemic-related criteria.

The companies say they are merely technology platforms that connect consumers ordering food or hailing rides with individuals willing to carry out the tasks. Those performing the tasks aren’t employees, in the companies’ view, but contractors, and the companies are fighting California legislation aimed at designating them as employees.

But the companies are heavily reliant on their drivers and couriers to meet demand, limit wait times and keep costs low.

Many of the workers, a large share of whom are immigrants and undocumented individuals, say that the legal and financial assistance offered by the companies in some situations isn’t enough. Those workers might have to explain an arrest record or misdemeanor offense, even a simple traffic citation that could affect their immigration status or future job prospects and otherwise complicate their lives in unforeseen ways.

Uber and Lyft helped set the tone for much of the gig economy with their original aggressive expansion models last decade. Those frequently encouraged breaking local regulations to give rides even when providing the service wasn’t yet legal, offloading the risk to drivers while sometimes offering to cover resulting fines.

Delivery companies in particular are seeing a flood of new workers who may be unaware of the risks. The companies have added hundreds of thousands of gig-work positions since the pandemic began, while the total number of people applying for unemployment benefits during the period soared past 40 million.

Those jobs can require zipping through city traffic on bikes and scooters while exposed to the elements, and they also expose workers to the risk of parking tickets and citations for delivery of alcohol to minors.

DoorDash courier Sherri Tucker of Decatur, Ga., had to pay more than $100 in fees after her car was booted amid George Floyd demonstrations in Atlanta while she retrieved a restaurant order. The 38-year old began working for DoorDash shortly before the pandemic and has found that it entails more risk than reward.

The ticket amounted to roughly “two days worth of work for DoorDash,” she said.

New rules to limit contact between customers and drivers has also meant that she may need to park illegally to rush food to someone’s door while juggling orders. “You’ve got to double-park and hope you don’t get booted,” she said.

DoorDash has worked to resolve parking problems for couriers in the past, for example opting into an experiment in Washington, D.C., to allow drivers to reserve curb space for drop-offs, a recognition of the issues of making deliveries in congested urban centers.

Both the pandemic and the protests prompted the companies to transfer responsibility to workers to understand the laws and risks associated with their jobs, said Bryant Greening, a lawyer and co-founder at Legal Rideshare, a personal-injury law firm representing ride-share drivers and passengers.

“It’s on the big dog, the company, to take those proactive steps rather than push those responsibilities and those risks onto the little guy,” he said.

Greening said his firm fielded dozens of calls amid the curfews seeking clarification from drivers on the rules. He said the companies should better inform their workers of the risk of arrest.

Amid the curfews, apps including Uber, DoorDash and Caviar pushed out notices to drivers and couriers about curfews and other restrictions with the intention of preventing interactions like the one involving the NYPD.

Caviar and Doordash’s instructions to New York couriers on June 4 said, “If a law enforcement officer or other public official attempts to stop you from providing delivery services, please show them this advisory linked below,” it said, and it included a posting with language explaining the exemption.

Catherine McCormack, a spokeswoman for DoorDash, said the company offered the courier arrested in New York City legal, financial, medical and mental support after the incident, and worked with city officials to sort out the situation.

The Caviar courier was taken into police custody and released, said Sgt. Jessica McRorie, an NYPD spokeswoman. The courier could not be reached for comment.

Uber spokeswoman Kayla Whaling said the company asked the NYPD and the mayor’s office to remind law enforcement officers of couriers’ status as essential workers, after the company learned of food couriers in the city being wrongly arrested. She said the company also offered legal help to any wrongly arrested couriers who had been delivering on the app.

The risk is particularly acute for people of color, who make up large portions of the gig workforce in cities such as New York City and San Francisco, workers say. A 2018 study prepared for the New York City Taxi and Limousine Commission found that 90 percent of New York City’s app-based drivers were immigrants, for example.

When Uber was trying to set up service in Portland, Ore., in 2014, the Portland Bureau of Transportation warned drivers that they, too, could face civil and criminal penalties. Uber had launched its app before officials established regulations allowing it to give rides, meaning the drivers also were operating illegally. In California in 2015, the company told drivers to ignore regulations and make pickups at Bay Area airports before they were officially allowed to operate at the locations, agreeing — along with competitor Lyft — to cover the fines, according to media reports from the time.

More recently, The Post reported, the Uber Eats software allowed couriers to deliver alcoholic drinks without seeing recipients’ IDs — potentially exposing those couriers to criminal penalties for carrying out orders exactly as assigned.

Farnaz Feizi of Vacaville, Calif., dropped off a soup container to a customer in a nearby Hampton Inn late last month, after which she was surrounded by police officers who told her she was being charged with selling alcohol to a minor.

The 28-year-old was caught in a California Department of Alcoholic Beverage Control sting to stop illegal deliveries of alcohol to minors. But Feizi, who was delivering for DoorDash, says she was never informed that the order contained alcohol.

“I can’t taste it. I can’t open it. There’s nothing written on a soup container that says ‘margarita,’” Feizi said.

John Carr, a spokesman for the California Department of Alcoholic Beverage Control, said that the department didn’t aim to target gig workers and that the agency doesn’t have jurisdiction over the apps because they are not licensed to sell alcohol. The restaurant selling the drink holds the license to sell alcohol and may be affected.

“ABC does not want to criminally cite delivery drivers, because we do empathize with all who are working during this pandemic and providing services to the public,” he said, adding, “At the same time, ABC cannot stand by and allow alcohol to be delivered to underage persons unchecked.”

McCormack, the DoorDash spokeswoman, said the company contacted Feizi to offer legal support after The Post sought comment. She said the soup container had been tagged incorrectly in the app and should have been labeled an alcoholic beverage.

Feizi hired an attorney and plans to fight the charge. She’s concerned that the misdemeanor offense could have implications for her employment years down the line.

The stakes are higher amid the pandemic and curfews. But the anxiety around unanticipated interactions with law enforcement is a common sentiment within gig work, where a single citation can wipe away a day’s earnings.

Derrick Baker of San Francisco said he was pulled over with passengers in his car after traveling over the Bay Bridge into the city one day last year, receiving a citation for more than $160 for not wearing a seat belt. He acknowledges the mistake but says the job is unforgiving in such situations.

“Any infractions, things like that, you do have to look and say, ‘Here goes a day’s pay or a day-and-a-half’s pay,’” said the 54-year-old Uber driver.