England's High Court has ruled that the ride-sharing smartphone app Uber does not infringe a law on the use of taximeters to calculate fares.
Uber had argued that its app, which calculates the fare based on GPS technology, was not a traditional meter and was therefore not unlawful.
"A taximeter ... does not include a device that receives GPS signals in the course of a journey," read a copy of the ruling issued by the justice ministry.
The California-based app hailed the judgment in a tweet saying: "A victory for common sense".
But the London Cab Drivers Club, which represents traditional taxi drivers, tweeted: "Bad News: The trade has lost the case in the High Court".
The Licensed Taxi Drivers' Association, another union representing many of London's 25,000 taxi drivers, had asked the judge to ban its use.
The traditional black cab drivers spend three years learning "The Knowledge" - every street in London and routes across it.
The case had been brought by Transport for London, the public agency which oversees the capital's transport system, which said it wanted legal clarity.
"TfL's view has always been that smartphones are not taximeters," it said in a statement.
"However, it recognised the validity of arguments to the contrary and the significant public interest in establishing legal certainty in the matter."
TfL is planning much stricter regulation of minicab services like Uber, which could include English language and map-reading tests for drivers.
"Disruptive technology and new business models have radically changed the way that taxi and private hire services operate and has widened customer choice," Leon Daniels, TfL's managing director for surface transport, said in the statement.
"This is welcome. At the same time, as the regulator, we must ensure that regulatory requirements are met and are developed in a way that delivers the high standards customers deserve," he said.
Uber has launched an online petition against the changes.
London is one of many cities where San Francisco-based Uber has sparked legal battles and opposition from taxi drivers.
TfL said the number of minicabs in London has risen from around 59,000 in 2009-2010 to more than 89,000.
At the current rate of growth, it said the total number could rise to 128,000 within two years.