Uber Technologies (UBER -4.07%) won its court battle with London regulators after a judge today ruled the ridesharing company has sufficiently changed so that it is no longer a risk to the public and should have its license restored, CNBC reports.

London is Uber's largest European market with some 45,000 drivers and 3.5 million users of its app.

Smiling car driver

Image source: Getty Images.

London's transportation regulator, Transport for London (TfL), first failed to renew Uber's license in 2017 and then stripped the ride-hailing app of its license altogether last year after the agency cited a "pattern of failures" that included allowing unauthorized drivers to gain access to the system and pick up at least 14,000 passengers.

TfL said it did not "have confidence that similar issues will not reoccur in the future, which has led it to conclude that the company is not fit and proper at this time."

After TfL failed to renew Uber's license, the ridesharing company was granted two extensions as it tried to rehabilitate its operations. When the regulator denied the renewal in November, Uber appealed, which allowed it to continue operating until a decision was rendered.

The judge hearing the appeal disagreed with TfL's characterization that the transportation company was a risk to public safety. Noting the numerous changes Uber has made to its operations, its improved communications with TfL, and the enhancements to its board's oversight, the judge wrote, "Despite their historical failings, I find them, now, to be a fit and proper person to hold a London [private hire vehicle] operator's licence."

Shares of Uber were rising 5% in pre-market trading.