Uber admitted Tuesday that it had collected tens of millions more from New York City drivers than it should have over a nearly three-year span dating back to November 2014, a critical financial oversight that led the company to pledge to reimburse “every penny,” in the latest setback for the Silicon Valley ride-hailing giant.

Tens of thousands of drivers in New York City were shortchanged, Uber acknowledged, and will now collect an average of $900 each in reimbursements, which includes interest on the lost earnings. The full cost to Uber of the payouts could not be immediately learned Tuesday.

“We are committed to paying every driver every penny they are owed — plus interest — as quickly as possible,” Rachel Holt, Uber’s regional general manager for the U.S. and Canada, said in a statement. “We are working hard to regain driver trust, and that means being transparent, sticking to our word, and making the Uber experience better from end to end.”

The problem stemmed from the company’s failure to adhere to a 2014 adjustment to commission calculations, according to Uber officials. As a result, Uber was taking its 25 percent cut based on what is known as the “gross fare,” which includes New York City’s roughly 2.5 percent black car fund fee and the city’s 8.875 percent sales tax. Uber should have excluded the tax and local black car fee — which goes to an injury compensation fund for New York black car operators — in its commission calculation.

In simpler terms, that means that for a $100 trip, where the black car fund and sales tax would total about $11, Uber should have pulled 25 percent of the remaining $89. Instead, Uber said, it was pulling 25 percent of the original $100.

The company said it noticed the problem as it prepared to announce a new route-based pricing system Friday and roll it out this week. Uber presented its admission as a genuine effort to correct the problem.

But labor groups, which are enmeshed in ongoing battles with the ride-hailing giant over its compensation of drivers, quickly called foul, alleging Uber was trying to avoid further damage in court.

The New York Taxi Workers Alliance, which filed a class-action suit against Uber in U.S. District Court last June over alleged violations of labor laws — and filed an amended complaint as recently as May 12 — charged that Uber’s actions came in response to its suit, which pointed out the discrepancy in commission calculations.

“This payout is an attempt by Uber to pull a fast one to avoid court oversight and shortchange drivers in the process. Nice try,” Bhairavi Desai, executive director of the New York Taxi Workers Alliance, said in a statement. “We’ll see Uber in court to win back all of the money drivers are owed, including up to double damages. Meanwhile, we’ll celebrate the victory of stopping this unlawful practice moving forward.”

Uber confirmed Tuesday that the issue had been raised before this week — but said it discovered the discrepancy on its own. The Taxi Workers Alliance’s amended complaint didn’t affect Uber’s approach to the issue, a company spokeswoman said.

The Wall Street journal was first to report that Uber would commit to tens of millions in payouts to drivers over the discrepancy. Uber said it’s investigating whether the same problem occurred in other markets, but had not uncovered any evidence that it had by Tuesday afternoon.

Lyft said in a statement Tuesday that it deducts “commissions and administrative fees” from gross fares in New York, meaning it did not make the same mistake, according to a company spokesman.

For Uber, it was the latest blow in a year of controversy for a company valued by some estimates at $70 billion. The Silicon-Valley based ride-hailing giant lost hundreds of thousands of users after the #DeleteUber hashtag was hatched in January, calling out the company for allegedly trying to disrupt a taxi strike protesting President Trump’s travel ban. A month later the company was embroiled in controversy again after a former employee penned an online post alleging widespread sexual harassment. In March, reports showed Uber had relied on a secret tool called “Greyball” to evade government regulators in locations where the service was outlawed, and the U.S. Justice Department later launched a criminal investigation into the issue.

The Independent Drivers Guild, an affiliate of the International Association of Machinists and Aerospace Workers that represents drivers, condemned Uber in a statement over the latest issue Tuesday, decrying what it saw as “theft of drivers’ hard-earned wages,” according to founder Jim Conigliaro, Jr.

“Drivers are relieved to be paid the money they are owed plus interest and we hope other companies follow suit,” added the guild’s executive director, Ryan Price.