London’s transportation regulator won’t renew Uber’s license to operate in the city, threatening the ride-hail giant’s future in one of its biggest markets.

On Monday, the agency Transport for London, which regulates taxis and for-hire vehicles in the city, said it has identified “a pattern of failures” by Uber that threatened rider safety, and that Uber hadn’t done enough to correct the failures.

Want the latest news on ride hailing in your inbox? Sign up here!

Uber will be able to operate in London for the next 21 days, and the company pushed a notification to local riders on Monday saying that the decision wouldn’t affect service. Uber said it would appeal the decision before a magistrate judge. “TfL’s decision not to renew Uber’s licence in London is extraordinary and wrong,” Jamie Heywood, Uber’s regional general manager for Northern and Eastern Europe, said in a statement.

Uber has a history of tussles with London regulators. The city’s transportation agency previously declined to renew its license in 2017, citing Uber’s approach to driver background checks and its failure to report criminal offenses involving drivers and passengers. Uber received a 15-month extension only after promising to rethink its approach to safety. Since then, the company has added driver education focusing on road safety, reformed its processes for reporting crimes to the police, added an in-app emergency-assistance button, and created an independent board dedicated to overseeing its operations in the UK.

Now London officials say that’s not enough. Transport for London says it uncovered at least 14,000 incidents in which Uber’s system allowed drivers to upload their photos to other drivers’ accounts, meaning the person who picked up a rider wasn’t necessarily the person attached to the account. In other instances, drivers who had been dismissed or suspended from the platform were allowed to create new accounts and drive again.

“While we recognize Uber has made improvements, it is unacceptable that Uber has allowed passengers to get into minicabs with drivers who are potentially unlicensed and uninsured,” Helen Chapman, TfL’s director of licensing, regulation and charging, said in a statement.

A failure to make nice with London regulators would be a serious blow to Uber. In filings with the US Securities and Exchange Commission, the company said that 24 percent of last year’s ride-hail gross bookings came from just five metros: Los Angeles, New York, San Francisco, São Paulo, and London. “Regulatory obstacles in any of these key metropolitan areas would adversely affect our business, financial condition, and operating results to a much greater degree than would the occurrence of such events in other areas,” the company wrote in its filing. Uber says that 3.5 million people use its ride-hail services in London.

Getting booted from London would also likely affect the transportation company’s standing among business travelers, who can’t seem to get enough of Uber. One of the app’s strengths is that a traveler can hop off a plane or a train or a ship and know that they have access to Uber’s network of drivers. Uber is the most expensed business vendor in North America, according to a recent report from the expense management software company Certify. London would likely have some very angry habitual travelers if the ride-hail app were forced to pull out of the city.

Moreover, sharks are circling in the UK’s largest city. The Estonian company Bolt (née Taxify) relaunched in London earlier this year. The French startup Kapten, which has backing from Daimler and BMW, has signed up some 16,000 drivers in the city, compared with Uber’s 40,000.