The taxi-hailing app operated in London by the US firm Uber does not break the law, the High Court has found.
The court had been asked to decide whether the company's smartphones were considered meters, which are outlawed for private hire vehicles.
The phones use GPS and external servers to calculate the cost of a journey.
Transport for London said taking the case to court had been "in the public interest".
The app-based company allows users to order cars via their smartphones, which often arrive within minutes and can cost a fraction of the price of a black cab.
Mr Justice Ouseley declared that taximeters do not operate in the same way as the app as they do not depend on GPS signals or include the app's other new-tech characteristics to calculate fares.
TfL and Uber had both argued at a one-day hearing earlier in October that the app was not a meter, and both organisations greeted the decision as a victory.
An Uber spokesman said: "This was not a marginal call; it is quite emphatic. In fact, it is contemptuous of the case brought before it."Image copyrightPAImage caption
Transport for London also welcomed the ruling, saying there had been "significant public interest in establishing legal certainty in the matter".
The Licensed Taxi Drivers' Association (LTDA), which represents many of the 25,000 licensed taxi drivers in London, asked the judge to rule it was a meter and ban its use.
LTDA chairman Richard Massett said: "We certainly are going to an appeal.
"It's a fact that the smartphone acts in exactly the same way as a taximeter. It calculates the fare by means of time taken and distance covered - and it's doing exactly the same job.
"Private hire legislation specifically precludes private hire from using a meter - and that's exactly what it is."
The Licensed Private Hire Car Association (LPHCA) backed the LTDA and said the app was "an attempt to circumvent the statutory prohibition" on minicabs using meters.
This is not the end of this story - I think it is only the beginning.
As well as probable legal challenges to the High Court taximeter ruling, there are big changes to regulation being proposed by the mayor.
Among those are a five-minute wait between booking a taxi via an app and the pick-up - and a ban on apps showing which cars are immediately available. That would seriously curtail how Uber currently operates.
A huge lobbying battle is now under way. Expect more protests from black cab drivers.
The policy-makers are scrambling to keep up with this new technology - it has tied them in knots.
There are also differing political opinions on the Uber app - the business secretary said in July he and the government welcomed "disruptive technology" - and that clashes with what the mayor is trying to achieve with his private-hire proposals.
Black cab drivers argue that the app poses a risk to public safety and customers being overcharged, with no opportunity to challenge fares before the money is automatically taken out of their bank accounts.
A spokesman for London Mayor Boris Johnson said: "The mayor is a strong supporter of new technology and he recognises that innovation is embraced by Londoners."
However, he acknowledged "huge challenges" for the taxi and private hire trades, and "legitimate concerns" over vehicle emissions and congestion.
He pointed out that TfL was carrying out a consultation on how to regulate the industry.
Uber's Jo Bertram said: "Now the High Court has ruled in favour of new technology, we hope TfL will think again on their bureaucratic proposals for apps like Uber.
"Compulsory five-minute waits and banning ride-sharing would be bad for riders and drivers. These plans make no sense. That's why 130,000 people have already signed our petition against these proposals."