Uber Technologies Inc. was given an 15-month licence to operate in London by a judge after the ride-hailing service worked out most of its differences with regulators.

Judge Emma Arbuthnot granted the licence in a ruling Tuesday. The case stems from Transport for London’s decision in September that Uber wasn’t "fit and proper" to hold a licence because of safety and governance concerns.

The ruling came after one-and-a-half days of arguments in which lawyers for Uber insisted the global ride-sharing app had completely overhauled its culture, passenger safety policies, and reset its testy relationship with the regulator. For TfL’s part, it effectively disengaged from the dispute and said that the main concerns had been addressed.

“Such a young business has suffered a number of growing pains which have not been helped by what seemed to be a rather gung-ho attitude of those running the business in the very recent past,” Arbuthnot said in the ruling. “The attitude of the previous managers of Uber appeared to me on the evidence to be that of grow the business come what may.”

More than 3.6 million people regularly use the Uber app in London. The ban had the firm at risk of being excluded from its biggest market in Europe at a time when it was already reeling from sexual harassment suits, employment claims, and regulatory probes around the world.

The September TfL decision sent shockwaves through the offices of businesses, city regulators, lawyers, employment unions, and media outlets worldwide. Dara Khosrowshahi was just weeks into his new role as Uber’s chief executive officer when, following the licence revelations, he flew to London and started the process of undoing what many onlookers saw as years of poor behavior on the company’s part.

The licence renewal process "certainly works better when an operator is asking permission rather than seeking forgiveness," Helen Chapman, TfL’s licensing director, told the judge.

The 15-month reprieve is far less than the five-year private hire licence the company had previously received or the 18-month approval sought by Uber at the court hearing.

“The rapid and very recent changes undergone by Uber lead me to conclude that a shorter period will enable TfL to test out the new arrangements,” Arbuthnot said in the ruling.

Uber and regulators have been slowly narrowing their differences for months. At an April hearing, lawyers said they had more than halved their disagreements to 11 from 25. At the time, Arbuthnot had been skeptical about Uber’s reforms, questioning whether the changes were just a "smokescreen."

Her concerns were evident from the start Monday, with the judge opening the hearing by saying that she thought an 18-month licence would be “too long.”

Despite its stance of “effective neutrality” at the latest hearings, TfL officials said that the company still had bridges to build.

"We’ve had five years of a very difficult relationship where Uber has felt it hasn’t required regulation," Chapman said.

The decision doesn’t put an end to Uber’s long list of legal troubles. In London, the company is appealing a ruling from an employment tribunal that would force the company to give drivers benefits including overtime and holiday pay.

In the U.S., the company faces claims from 14 women who say they were sexually assaulted or harassed by Uber drivers. The women wrote a letter to the company asking that the dispute go forward in open court as a class-action lawsuit, rather than in private arbitration.