Nine months after its license was denied, Uber has been cleared to continue operating in London— a critical market for the ride-hailing giant.

A British Magistrates’ court ruled Tuesday that the controversy-plagued company is “fit and proper” to hold a 15-month probationary license to operate. But Uber committed to changes, including providing training for drivers and notifying authorities when a driver is removed the platform.

Transport for London, the city’s regulatory body, ruled last fall to revoke Uber’s private hire license, citing concerns about safety related to background checks of the company’s drivers and crime reporting — characteristic of Uber’s “apologize later” tactic when entering new markets. London Mayor Sadiq Khan backed the ban.

Despite the ban, Uber continued to operate in London during an appeals process that has lasted nearly a year. Uber has 45,000 drivers and 3.6 million riders in the city.

Since the ruling last year, Uber has adopted a more conciliatory approach under new leadership. “We will continue to work with TfL to address their concerns and earn their trust, while providing the best possible service for our customers,” Tom Elvidge, Uber’s general manager in Britain, said Tuesday.

“No matter how powerful and how big you are, you must play by the rules,” Khan said in a statement posted on Twitter.

Uber officials have been engaged in a protracted effort to redefine the company image in recent months. That effort is being spearheaded by Uber CEO Dara Khosrowshahi, the soft-spoken leader who took over the company in August. Khosrowshahi has apologized for the company’s previous misdeeds, including in London, where he published a letter in the Evening Standard in September promising to “make things right.”

“While Uber has revolutionised the way people move in cities around the world, it’s equally true that we’ve got things wrong along the way,” Khosrowshahi wrote. “On behalf of everyone at Uber globally, I apologise for the mistakes we’ve made.”

Nine months later, Khosroshahi’s apologies appear to have paid off, with Judge Emma Arbuthnot saying Uber and the regulatory agency could “test out the new arrangements.”

Harsha Prabath Kumara, a 34-year-old Uber driver originally from Sri Lanka, said the court “made the right decision.”

“This is what we wanted as well, to keep drivers and to provide the best service,” he said.

Kumara said he disagreed with the mayor’s push to pull Uber’s license. He said all the drivers are licensed by Transport for London, the transit authority, and that they fulfilled all requirements.

He said that Uber is safe for customers, as all details — of the car, route, driver, passenger — are recorded and stored.

During the months while this was in court, Kumara and most Uber drivers remained on the roads and there was no reported drop in number of drivers and rides.

"I kept driving, with no change,” he said.

He said Uber is popular in part because the city's transit system is often overwhelmed with busy stations shut down at peak hours when overcrowded.

Also, a heat wave in London this week has slowed many rail and subway lines because tracks expand in the heat and train engineers must slow down, leading to back ups.

“Customers will be happy to hear this news,” said Kumara, adding that its appeal is the lower price compared to the city’s traditional black taxis and the ease of ordering a ride on an app. “This is what they wanted. People like Uber.”

correction

An initial version of this story stated that Uber would be returning to London after a nine-month-long hiatus. While TfL filed against Uber, the company continued to operate in London as drivers and riders awaited the results of an appeals process.