In five years, ride-hail phenomenon Uber has raced ahead of the pack, expanding to hundreds of cities in 68 countries and drawing billions in investor dollars.

Germany Uber Protest

But in Frankfurt, Germany, and other European cities, Uber is running into major roadblocks. In November, the company shut down its small Frankfurt office in the city center after only 18 months in operation.

The retreat was spurred in part by local drivers who refused to work for the San Francisco-based company.

Critics say Uber’s aggressive, no-holds-barred approach did not sit well with German drivers and regulators.

The company’s low-cost UberPop service faced legal challenges and was eventually outlawed. Uber then tried to recruit licensed German drivers but was mostly rebuffed.

The company also pulled out of Hamburg and Dusseldorf after less than two years of service in those cities. In Amsterdam, the company stopped offering its UberPop service.

In Paris and Madrid, Uber has been confronted by strong opposition from taxi operators and in London local regulators are considering changes that would seriously hamper the company’s operations.

With a strong city core and cosmopolitan population, Frankfurt appeared to be an ideal market for the ride-hail business. The company, however, miscalculated how to win over locals and underestimated how to maneuver the regulatory process in Europe’s largest economy.

Uber says it can create thousands of jobs in Germany if given the opportunity to do so. Uber has petitioned the European Commission, the executive arm of the European Union, to intervene.

“Have we made mistakes? Absolutely,” said Mark MacGann, Uber’s head of European policy. “But the current system in Germany artificially protects incumbents who think they have the right to own the market.”

MacGann says that German taxi unions have lobbied hard to push Uber out of the market, and that the ride-booking service will eventually return to multiple cities across the country.

“Germany may end up being the final frontier of Uber’s success story in Europe,” he said. “I’m confident that Germany will be as big a market for us as the United Kingdom is right now.”

The company still operates in Berlin and Munich and is reevaluating its European strategy.

Frankfurt offers an insightful case study in how Uber’s aggressive tactics can backfire.

Like many cities around the world, the number of licensed taxis in Frankfurt is capped, which means that at peak times, there is often more demand for rides than there are available taxis.

When Uber arrived, unlicensed drivers signed up with UberPop service started showing up at the main entrance to the train station to scoop up passengers, often offering discounted rates as low as one-third cheaper than licensed drivers, according to the city’s taxi unions.

The Uber incursion led to legal battles on several fronts as German taxi unions sued, citing some of the same arguments heard in U.S. cities – that Uber drivers were offering services without having to obtain proper licensing and insurance.

In March of 2015 a Frankfurt judge ruled that Uber drivers were required to hold official permits to operate. That led to Uber shutting down its UberPop service and switching to offering only licensed service.

But the alienation of local drivers made recruiting those same drivers an uphill battle for the company.

Uber could not persuade enough licensed drivers to sign up, even after it offered to pay for licenses and help with other regulatory costs that totaled as much as $400 for new drivers, according to several local taxi groups and policy makers.

Uber’s stumble in Germany opened the door for new players in the market. Offering features that Uber pioneered: on-demand pickup, fare quotes and in-app payments, companies such as Taxi.eu and MyTaxi emerged.

Taxi.eu, run by the managing director of a Berlin taxi dispatch center, is now available in 12 countries with 160,000 drivers.

“We need a strong network to fight against Uber,” said Taxi.eu founder Hermann Waldner. “That’s the only way to stay strong against Uber.”