Had the law gone into effect, it would have limited the amount of time Uber and Lyft drivers could spend searching for passengers in Manhattan south of 96th Street to 31 percent of their overall drive time, down from 41 percent. When it passed the rule this summer, the city's Taxi and Limousine Commission said it was an attempt to reduce traffic congestion in New York's busiest borough where cars driven by Uber and Lyft contractors, along with yellow cabs, can make up as much of 50 percent of traffic.

When Uber challenged the law in September, it said it would threaten the livelihood and flexibility of drivers. In advance of the law going into effect in February 2020, both Uber and Lyft had limited access to their apps, locking local drivers out at certain times and areas of the city. In his ruling, New York State Supreme Court judge Lyle Frank criticized the city for its 31 percent target, saying it provided "scant rationale" for it.

"Uber remains committed to fighting for driver flexibility in the face of politically motivated regulations and to stand up for policies that actually combat congestion," the company said in a statement to Reuters. We've reached out to the company for more information.

"The court's decision confirms that the TLC took a rushed, arbitrary approach to developing this rule and created bad public policy. We look forward to working with state and city leaders to address New York City's transportation challenges with the only true solution to congestion: comprehensive congestion pricing," a spokesperson for Lyft told Engadget. The city hasn't issued a statement on the ruling yet.

While both Uber and Lyft are sure to be happy about the ruling, the former is likely especially thankful. Last week, a German court effectively banned the company's ride-hailing service in the country.