The food delivery service DoorDash will pay $2.5 million to settle a lawsuit brought by D.C.’s attorney general that alleged the company pocketed workers’ tips, prosecutors said Tuesday.

In November 2019, D.C. Attorney General Karl A. Racine (D) sued DoorDash, alleging that between 2017 and 2019, the company misled consumers who thought their tips increased delivery workers’ pay, when the tips were actually used to supplement the company’s payments to these workers.

The companychanged its policy in September 2019 and agreed Tuesday to pay $1.5 million to delivery workers, $750,000 to the District and $250,000 to two D.C. charities.

“Today’s settlement rights a wrong that deceived D.C. consumers and deprived workers of monies that they should have been paid,” Racine said in a statement. “Gig economy companies provide important and necessary services, especially during the pandemic. However, the law applies to these companies, just as it does to their brick and mortar counterparts.”

Under the consent order, DoorDash does not admit wrongdoing and denies the allegations. In statement, company spokeswoman Campbell Matthews said it was “pleased to have this issue behind us.”

“Our focus is on continuing to support Dashers, restaurants, and customers in DC and around the country,” the statement said.

This story has been updated.