London (CNN Business) 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 beyond midnight local time on Monday. In a statement, Transport for London (TfL) said it had identified "a pattern of failures" that placed passengers at risk . It said 14,000 trips taken recently involved unauthorized drivers who were able to pass themselves off as other Uber drivers.

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.

"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 thousands of recent journeys 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. TfL also noted another failure with Uber's systems: Uber was allowing dismissed or suspended drivers to create Uber accounts and carry passengers.

"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.

Daniel Ives, an analyst at Wedbush Securities, said he believes Uber was caught "flat footed" by the decision.

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 São Paulo. Uber said recently that 3.5 million Londoners regularly use its app. It claims 45,000 drivers in the capital.

"If Uber ultimately was not able to operate in London it will be a 'seismic blow' to the company's European operations," Ives said, adding that the decision "could have a major ripple impact across other European cities."

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

BMW BMWYY Daimler DDAIF 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 byand, has also been generating buzz.

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

— Charles Riley, Chris Liakos and Julia Horowitz contributed to this article.