(Bloomberg) -- Uber Technologies Inc., DoorDash Inc. and Grubhub Inc. must pay food delivery workers at least $17.96 an hour after they lost an attempt to block the New York City minimum, a victory for the city as it seeks to rein in the now-ubiquitous services.

New York State Supreme Court Justice Nicholas Moyne on Thursday declined to bar the city from implementing the rule, which forces companies to either pay couriers the flat hourly rate or pay per delivery at about 50 cents a minute. The three companies joined forces this year to fight the rule, which would have gone into effect on July 12. 

The case is one of several that delivery companies have launched in recent years to stymie efforts by New York to regulate their operations. Those include a 2021 challenge to a cap on commissions the apps can collect from restaurants and an attempt last year to strike down a requirement that they share customer data with the eateries they serve.

Read More: DoorDash Files Suit Against New York City Over Order Privacy 

New York and other large cities have taken measures to regulate apps that facilitate ridesharing, food deliveries and short-term rentals as the apps have gained acceptance in recent years, leading to a number of legal skirmishes.

‘Extreme Pay’

The new law also provides for a second raise to almost $20 an hour in April 2025 for app delivery workers. The city’s minimum wage is $15 an hour.

“This law will put thousands of New Yorkers out of work and force the remaining couriers to compete against each other to deliver orders faster,” Uber said in a statement Thursday.

DoorDash said it was evaluating its legal options. “This is a deeply disappointing outcome for delivery workers, merchants, and customers who look to our platform,” a spokesperson for the company said in a statement. “The City’s insistence on forging ahead with such an extreme pay rate will reduce opportunity and increase costs for all New Yorkers.”

Shares of Uber closed up 2.2% to $46.14, amid broad gains by tech stocks, while DoorDash shares ended the day down 0.5% at $77.80.

‘Backs of Immigrant Workers’

There are an estimated 60,000 delivery workers in New York who are paid about $11 an hour after tips and expenses, according to the city. Many of those are migrants, said Worker’s Justice Project, an advocacy group that backed the rule.

“Multibillion-dollar companies cannot profit off the backs of immigrant workers while paying them pennies in New York City and get away with it,” the group said in a statement. “The judge’s ruling is another reminder that workers will always win.”

Vilda Vera Mayuga, commissioner of the city’s Department of Consumer and Worker Protection, said the ruling affirmed the city’s commitment to “dignified” wages.

“Delivery workers, like all workers, deserve fair pay for their labor and to be able to support themselves and their loved ones,” she said in a statement.

Read More: DoorDash, Uber Sue New York City Over Cap on Delivery Fees 

Moyne temporarily blocked the rule from going into effect in July as he reviewed the suits. The apps argued the measure isn’t suitable for gig-based work and could increase fees for customers while reducing the amount the couriers earn. The city meanwhile said the increase in pay was necessary to compensate workers who risk their lives to deliver food to residents.

Another company that joined the delivery giants in the suit, Relay Delivery Inc., a small courier service for restaurants, argued the rule would put it out of business because it works directly with eateries that wouldn’t be able to absorb the cost of an increase. The judge exempted Relay on Thursday, which he said already regularly pays its workers at least $19.43 per hour.

The rule was originally passed on June 12, following a set of bills enacted in September 2021 by the city to grant sweeping protections to food couriers.

The cases are Uber Technologies Inc. v. New York City Department of Consumer and Worker Protection, 155943/2023, and DoorDash Inc. and Grubhub Inc. v. New York City Department of Consumer and Worker Protection, 155947/2023, New York State Supreme Court, New York County (Manhattan).

--With assistance from Natalie Lung and Jessica Nix.

(Adds closing share prices in second section and Mayuga’s statement in third.)

©2023 Bloomberg L.P.