Uber has just suffered a significant setback in one of its biggest markets.

London transit officials have decided not to extend the company's license to operate in the city beyond midnight local time on Monday. In a statement, Transport for London (TfL) said it had identified "a pattern of failures by the company including several breaches that placed passengers and their safety at risk."

Uber said it would appeal the decision not to renew its license, describing it as "extraordinary and wrong." It can continue to provide services in London while the appeal is heard. Uber shares fell by more than 5% in premarket trading.

The company has been here before. The city first declined to renew its license in 2017, citing several concerns including how Uber responded to serious crimes. Uber appealed that decision and was later granted permission to operate for 15 months. In late September, the regulator granted Uber an additional two-month license.

"We have fundamentally changed our business over the last two years and are setting the standard on safety," Jamie Heywood, Uber's general manager for northern and eastern Europe, said in the statement. "TfL found us to be a fit and proper operator just two months ago, and we continue to go above and beyond."

But transit officials, and Mayor of London Sadiq Khan, expressed concern that at least 14,000 trips in recent months involved unauthorized drivers uploading their photos to the accounts of other Uber drivers, allowing them to pick up passengers as if they were the booked driver.

"At this stage, TfL can't be confident that Uber has the robust processes in place to prevent another serious safety breach in the future," Khan said in a statement.

Uber said it had audited every driver in London over the last two months, and strengthened its processes. The company also said it would soon be introducing a new "facial matching process" to confirm the identity of drivers.

London is one of five global cities that accounted for nearly a quarter of Uber bookings in 2018, along with Los Angeles, New York City, San Francisco and So Paulo. Uber said recently that 3.5 million Londoners regularly use its app. It claims 45,000 drivers in the capital.

Shorter licenses spanning months, not years, have become the norm for ride-hailing companies in London.

And competition in the city is heating up. Bolt, which used to be called Taxify, returned to London this year. Kapten, a French startup backed by BMW and Daimler, has also been generating buzz.

Ola, a powerhouse in India that's also expanding to new markets, also poses a threat.

— Charles Riley and Chris Liakos contributed to this article.