Uber has been granted a short-term licence to operate in London following a court hearing.
Transport for London (TfL) refused to renew the licence when it expired last September, saying the US taxi app was not a "fit and proper" operator.
Uber has now been awarded a licence but it has been put on probation for 15 months.
The company had been seeking a five-year licence when it was refused last year.
Following a two-day hearing at Westminster Magistrates' Court, Chief Magistrate Emma Arbuthnot said Uber was now considered "fit and proper".
She ordered the company to pay TfL's legal costs of £425,000.
London mayor Sadiq Khan said: "After years of operating poorly in London, Uber has now accepted that TfL's action in refusing to renew their licence was totally justified. Today our stance has been vindicated by the court.
"Uber has been put on probation - their 15 month licence has a clear set of conditions that TfL will thoroughly monitor and enforce."
Tom Elvidge, Uber's UK general manager, said he was pleased with today's decision: "We will continue to work with TfL to address their concerns and earn their trust, while providing the best possible service for our customers."
One of the areas of concern that TfL highlighted last year was about how Uber reported crime.
The company said that it had made "wholesale" changes to the business since last September.
This includes reporting crimes directly to the police instead of logging criminal complaints with TfL, which caused delays.
During this week's hearing, Helen Chapman, the licensing, regulation and charging director at TfL, said that Uber's behaviour over reporting allegations to police was "very disturbing".
She said: "I think we have had five years of a very difficult relationship where Uber has felt they haven't required regulation and being operated in the same way as everybody else we regulate."
Ms Chapman said that the changes implemented by Uber "could, if applied correctly, enhance public safety".
TfL said the way the firm was run had potential public safety and security implications when it decided not to renew its licence to operate in London last year - a decision backed by Mr Khan.
In particular, it highlighted Uber's approach to reporting serious criminal offences, how medical certificates are obtained and background checks on drivers.
Among the changes implemented by Uber, drivers can now only use the app in the region in which they hold a private hire licence and their working hours are more tightly regulated.
A licensed driver on the app has to now take an uninterrupted six-hour break after 10 hours of taking passengers or travelling to pick them up.
The firm also made changes to its app in London to "make it clearer" to passengers that its drivers are licensed by TfL and that it accepts ride requests before allocating drivers.
It also dropped an appeal against a move that would make all its drivers in the city take English language tests.