By Alistair MacDonald and Sam Schechner

LONDON -- Uber Technologies Inc. won an appeal over the revocation of its operating license in the U.K. capital, securing for now the ride-hailing company's operations in one of its biggest global markets.

The ruling is a step forward for Uber as the company tries to build trust with regulators after years of tussles in London and elsewhere. Under co-founder Travis Kalanick, who resigned as chief executive in 2017 and left the board late last year, Uber regularly tested the regulatory and legal envelope of countries where it operated in order to speed growth.

The dispute in England stemmed from the refusal by London regulators last November to renew Uber's license to operate, after finding widespread instances of unauthorized drivers using the app to pick up customers.

Uber said at the time that it had fixed the problem, but London officials said they wanted to make sure there weren't other software issues. Uber appealed the decision and was allowed to keep its drivers on London's streets during the process.

On Monday, a London court found that Uber was now "fit and proper" to hold a license, despite some continued breaches, according to the verdict.

In a statement, Uber said it had been granted an 18-month license that made it subject to a bevy of new conditions. "This decision is a recognition of Uber's commitment to safety," the company said.

Uber's shares rose 3% Monday on a strong day for the U.S. stock market. For 2020, the stock is up nearly 20%.

The ruling heads off -- at least for the next year and a half -- a long-running threat by Transport for London, the city's main transportation operator and regulator, to prohibit Uber from operating in the U.K. capital. Shortly after entering the London market, city regulators began accusing the company of safety and regulatory shortfalls, allegations that Uber fought vigorously at first before taking a more conciliatory approach. Since taking over in the summer of 2017, Chief Executive Dara Khosrowshahi has acknowledged shortfalls.

Uber has clashed with regulators in other parts of the world. In California, the company is involved in ongoing litigation over whether it must reclassify its drivers as employees, a move that would upend the cost structure of its business.

Uber and rival Lyft Inc. have said they believe their drivers are independent contractors, in part because the companies describe themselves as digital-app operators that match drivers with riders, not transportation providers.

The companies are seeking to have California voters weigh in on the matter using the state's ballot-measure process, which allows laws to be passed, overturned or amended by popular vote instead of by the legislature. The initiative, known as Proposition 22, has become one of the most expensive ballot measures in California history.

In addition to the regulatory battles, the company's core ride-hailing business has suffered from a fall demand for transport services during the Covid-19 pandemic. In August, Uber reported weak second-quarter results, with ride bookings down 75% year-over-year and 72% from the previous quarter.

London is one of Uber's biggest and most important markets globally. As in other cities, the company met stiff resistance from taxi and licensed-cab drivers, but opposition from groups representing London's ubiquitous black cabs was particularly fierce. Many residents have embraced Uber as a middle ground between the city's extensive and relatively cheap public transportation and pricier black cabs. The company has said it has 3.5 million riders and 45,000 licensed drivers in London.

The court listed a number of recent breaches of Uber's license by drivers, including vehicles that didn't have certification that they were roadworthy, but said the company had reduced the occurrence of such offenses, according to a copy of the verdict. The court also said Uber had increased board oversight of the issues and improved communication with TfL, adding that there was no evidence that the company had tried to conceal any of the breaches.

Uber "does not have a perfect record, but it has been an improving picture," the court said.

In November 2019, TfL revoked Uber's license, saying it had found 14,000 instances in late 2018 and early 2019 in which unauthorized drivers swapped their own photos with those of authorized drivers on Uber's platform, allowing them to pick up riders themselves. A TfL spokesman said at the time that in some cases it believed drivers were using the loophole to allow people they knew to use their own accounts to pick up riders.

It wasn't Uber's first skirmish with TfL. In 2017, the authority rejected Uber's application for a long-term license because of issues regarding safety and its corporate culture and governance. It pointed to Uber's internal use of an app called Greyball, which allowed it to evade surveillance by local authorities, as well as problems with the company's reporting of crime to the police.

Uber appealed that decision and won a 15-month license, which expired in September 2019. The regulator then gave Uber a two-month license, which expired last November.

Write to Alistair MacDonald at alistair.macdonald@wsj.com and Sam Schechner at sam.schechner@wsj.com