DoorDash will pay more than $5.3 million under the agreement, San Francisco City Attorney David Chiu said in a statement. About $5.1 million will go to the nearly 4,500 DoorDash workers who completed deliveries in San Francisco between 2016 and 2020.

"We are living through an era of deep inequality, and nothing could be more important than ensuring workers are paid fairly and their benefits are safeguarded," Chiu said in a statement.

DoorDash did not admit any wrongdoing as part of the settlement and in a statement said it was proud of the flexible earning opportunities it offered.

"While we deny any wrongdoing, we feel that this settlement represents a fair compromise that will allow us to focus on continuing to provide the best experience for Dashers," the company said.

The city opened a formal investigation into DoorDash in 2019 after media reports said the company was using customer tips to subsidize workers' base pay.

The city alleged DoorDash was violating San Francisco's health care benefit and paid sick leave laws by misclassifying workers as independent contractors, rather than employees.

The settlement is part of a larger fight between gig economy companies and lawmakers, which culminated in a California ballot initiative in Nov. 2020, during which voters cemented gig workers' status as independent contractors, while entitling them to some benefits.

Fights over the status of workers at DoorDash, Uber, Lyft and other gig companies continue across the United States, in Canada and Europe. Companies say the majority of workers do not want to be employees and enjoy the flexibility offered by on-demand work.

(Reporting by Tina Bellon in Austin, Texas; Editing by Stephen Coates)

By Tina Bellon