Ride-hailing rivals Uber Technologies Inc. and Lyft Inc. suspended shared-ride services Tuesday as COVID-19 spreads across the world, and their stocks dipped despite a rebound for the markets overall.

Groups representing drivers had complained about still being asked to pick up multiple riders and stuff them into the same car as the novel coronavirus spread and more people attempted to avoid close contact with strangers. Uber UBER, +0.16% and Lyft LYFT, -2.08% are both based in San Francisco, which established a shelter-in-place mandate Monday night that will keep everyone in their homes for at least three weeks.

“No one should be riding around in a car full of strangers right now. We are thankful that Uber and Lyft listened to drivers’ concerns and put the health of the community first,” said Moira Muntz, spokeswoman for The Independent Drivers Guild, which advocates for thousands of drivers in New York City.

Uber, the larger of the two companies, said that it was suspending its Uber Pool service in the U.S. and Canada, and would begin issuing messages to users attempting to request any ride in those countries that would encourage them to “flatten the curve” or ”travel only when necessary.”

“Our goal is to help flatten the curve of community spread in the cities we serve. With that in mind, we are suspending the Uber Pool service in the United States and Canada,” Andrew Macdonald, senior vice president of rides and platform for Uber, said in a statement, while providing more information on Twitter. “We remain in close contact with local leaders and will continue to work with them to discourage non-essential travel.”

See also: How much do you tip a delivery person or Uber driver amid COVID-19 pandemic?

Uber will continue offering rides as well as its Uber Eats delivery service, a key differentiator between Uber and Lyft.

“Lyft is pausing Shared rides across all of our markets,” a Lyft spokeswoman said in a statement. “The health and safety of the Lyft community is our top priority, and we’re dedicated to doing what we can to slow the spread of COVID-19. We will continue to monitor the situation closely and base our actions on official guidance.”

Uber and Lyft gave slightly different updates about their service amid the coronavirus outbreak earlier this month, with Lyft saying that riders avoiding public transit were helping its service, while Uber Chief Executive Dara Khosrowshahi pointed out a decline in airport rides but an increase in delivery needs.

For more: Lyft, Uber appear to disagree on coronavirus effect on ride-hailing industry

The loss of shared rides may not have too much of an additional effect on the finances of the two companies — shared rides add to revenue, but hurt margins. Still, as many in the U.S. and Canada prefer to stay at home to avoid spreading the virus, any further impediment for drivers will add up.

“This was a smart and proactive move by Uber and Lyft to limit social distancing and take the decisions away from the consumer,” Wedbush analyst Daniel Ives said in an email. “While fundamentals take a hit right now, these companies are focused on the health of drivers and consumers over their growth.”