SAN FRANCISCO — Uber and Lyft, staring down city curfews just as coronavirus stay-at-home orders were being relaxed, are facing a tough choice.

The curfews, enacted amid demonstrations after the death of George Floyd in Minneapolis police custody, typically limit presence on the streets to essential business. And cities have various interpretations of how essential both Uber and Lyft are.

New York opted to suspend Uber, Lyft and Via during the curfews. Mayor Bill de Blasio (D) said on CNN on Tuesday night that the decision was made because “looters were using them,” although the city has not backed up the claim. In San Francisco and Oakland, Calif., the companies said city officials asked Uber and Lyft to suspend service.

But a Bay Area operations manager for Uber said in an internal email obtained by The Washington Post that the company does not plan to stand down easily.

“The shutdown will be contingent on Lyft shutting down operations first,” the manager said in an email Sunday to company engineers. A subsequent email, on Monday, said company executives signed off on the plan.

Eventually, however, Uber paused trips in San Francisco and part of Oakland, while Lyft halted service only in downtown Oakland. San Francisco officials later decided that ride-hailing was allowed.

By Tuesday, rides were available in San Francisco on both platforms, although Lyft warned riders to take trips “only if you must,” citing local guidance that “only essential trips are permitted” during the curfew, while Uber carried no visible warning. Lyft has suspended trips in downtown Oakland based on city guidance since Saturday night, a measure that has continued nightly through curfew hours.

In other cities, the companies said they were approaching the orders on a case-by-case basis. They argue, however, that they provide an essential service for workers who need to get around.

“Shutting down our platform is a major decision that can leave people stranded — especially in underserved areas where public transit is limited due to COVID-19,” Lyft spokeswoman Alexandra LaManna said. “This is why we are remaining operational during curfews in regions where we haven’t been explicitly required to stop operating.”

Uber spokeswoman Kayla Whaling said the company was working closely with cities to understand whether to suspend service during curfews.

“Some cities have requested that we suspend operations during curfew hours, while others want to ensure Uber is available for essential services,” she said.

The curfews, city orders and accompanying decisions about whether to follow them arrive just as both Uber and Lyft are starting to emerge from a prolonged decrease in ridership due to the coronavirus pandemic. Uber and Lyft lost 80 percent of their ridership during the height of the stay-at-home restrictions to help slow the spread of the novel coronavirus.

Under pressure to limit their losses, the companies have had to make aggressive cost-cutting moves, including layoffs. The companies face months or even years of changes in ridership trends, particularly as consumers may be less comfortable sharing a ride. Uber has also worked to extend its business lines, emphasizing its food delivery business and moving into package deliveries.

Data released by Lyft this week indicated that the pain has been easing, however, with seven straight weeks of increasing ridership on the app as stay-at-home restrictions were lifted. Lyft said in a filing that trips were up 26 percent in May compared with April, with locally higher growth rates in cities that were opening up.

Several of those cities implemented curfews. Although some were lifting starting Wednesday, New York City’s 8 p.m. curfew went into effect as planned. Citing the importance of the demonstrations, San Francisco Mayor London Breed (D) said the citywide curfews will end at 5 a.m. local time Thursday.

“The protests we have seen in this city and across the country are for an important cause, and our city will continue to facilitate any and all peaceful demonstrations,” she said in a tweet.

Uber has suspended service in response to curfews in New York, Minneapolis, part of Oakland and downtown Los Angeles. In other locations, such as Portland, Ore., Seattle, Denver and Salt Lake City, the company told riders that only essential trips were allowed. It also capped its surge pricing in some city centers, ensuring that passengers using the service would avoid paying excess costs due to a lack of demand.

LaManna said Lyft was required to suspend service in some markets, such as New York and Oakland’s city center.

“We know this is difficult for those who rely on Lyft, especially essential workers and those needing to get home,” she said, referring to New York’s ride-hailing prohibition from the curfew’s 8 p.m. start until 12:30 a.m. “We are working hard to reach an agreement that best supports New Yorkers.”

In New York City, the mayor’s office and the Taxi and Limousine Commission, which regulates ride-hailing apps, declined to comment on a request for any data or examples used to justify the decision to ban Uber and Lyft, deferring to the New York City Police Department. The NYPD did not respond to an emailed request for comment seeking data or specific examples on the looting claims.

Freddi Goldstein, a spokeswoman for de Blasio, said that while ride-hailing apps were suspended, “other options remain available for those in need.” She said taxis are available and that subways and buses are running.

The confusion at a municipal level over Uber and Lyft’s role in the functioning of the city is a microcosm of broader arguments in Silicon Valley over whether they are transportation networks or technology platforms. Uber and Lyft argue they are the latter, shielding them from the need to offer drivers employment because they are independent contractors providing a service they are free to offer elsewhere, in the companies’ view.

In San Francisco, the city said it does realize that the companies can provide service for workers commuting between home and work.

“The curfew order allows taxi and ride hail drivers to transport people to work and home from work, but drivers must notify all customers that they may only take rides to work or to home,” John Coté, spokesman for San Francisco city attorney Dennis Herrera, said in a statement.