LONDON — The most popular service of the ride-hailing company Uber has been barred from operating in Germany in one of the most severe legal restrictions the company has faced since it was founded five years ago.

The move, the first nationwide ban of an Uber service, is the latest in a number of legal setbacks that the company, based in San Francisco, has faced in Europe and North America as it tries to expand its car service globally.

In Frankfurt, a state court banned Uber’s low-cost UberPop product, which connects drivers with potential customers, from operating in the country until a hearing this year on whether it unfairly competes with local taxis. A temporary injunction was ordered last week but became public on Tuesday.

Uber, which allows people to use their smartphones to book rides with freelance drivers, said it would continue operating in Germany and would appeal the court’s decision.

But Uber could face fines in Germany of up to 250,000 euros, about $330,000, or its local employees could be jailed for up to six months if the company violates the temporary injunction. The company’s drivers, who are not employees, would not face direct penalties.

Because the court has no enforcement capacity, however, the taxi group that brought the case will have to file a separate complaint over any violation of the injunction. If the taxi association had grounds to think Uber is violating the injunction, it would have to file another legal complaint against Uber, and then the court would have grounds to ask the authorities to act.

The court in Frankfurt found that Uber posed unfair competition to the local taxi industry. It said Uber did not have the necessary licenses and insurance for its drivers and noted that the company could be selective in providing rides, while taxi drivers are required to accept anyone needing a ride.

“Our main concern is that, while competition is healthy, everyone has to be playing by the same rules,” said Arne Hasse, spokesman for the Frankfurt state court.

Uber’s premium product — the so-called Uber Black, which uses luxury sedans and chauffeurs — is not affected by the court ruling.

Until a final ruling, Uber, a start-up that has been valued at more than $15 billion and operates in more than 100 cities in 45 countries, may be liable for the German fines each time it violates the ban.

Uber has faced opposition in cities like New York and London, though it now operates legally in both places. But Uber faces obstacles worldwide. In April, a court based in Brussels threatened to impose a €10,000 fine on Uber’s drivers for every ride that they accept in the city. A case against Uber also has been sent to one of Britain’s highest courts to decide whether the technology meets London’s taxi rules.

Uber, in a statement, said Germany was one of its fastest-growing markets in Europe. “You cannot put the brakes on progress,” it said. “We believe innovation and competition is good for everyone — riders and drivers, everyone wins.”

Other American technology companies, like Amazon and Google, have also faced legal difficulties in Germany related to the country’s labor standards and strict privacy rules.

Some policy makers, including Neelie Kroes, the departing European commissioner in charge of the Continent’s digital agenda, criticized the court’s decision, saying it could hamper innovation and reduce competition.

Other analysts, however, said the court was simply addressing a specific legal challenge linked to how Uber must ensure that all of its drivers meet the country’s taxi regulations.

Masan Turun, a 40-year-old taxi driver in Berlin, said he found the ruling fair, given that Uber drivers did not have to meet the standards required of taxi drivers. “They don’t have to learn any street names, hotels or hospitals,” Mr. Turun said.

Another Berlin taxi driver, Brigitte Holzwarth, 60, said the ruling against Uber was a good start. “So far they haven’t harmed us much, but if they expand, it could become problematic for the taxi industry,” she said. “It is expanding, especially among young people.”

The latest challenge was brought by Taxi Deutschland, a German trade group that has regularly criticized Uber for not complying with the regulations.

Unlike earlier court cases in Hamburg and Berlin, which addressed the company’s failure to comply with local public transport laws, the Frankfurt case was based on claims that Uber had violated competition law.

Dieter Schlenker, the chairman of Taxi Deutschland, referred to Uber’s business model as a “locust” and took aim at the company’s investors, which include Google’s venture capital unit.

“Uber operates with billions of cash from Goldman Sachs and Google, wraps itself up to look like a start-up and sells itself as the savior of the new economy,” Mr. Schlenker said.

Other German taxi groups, which have fought Uber’s rise in cities like Berlin and Hamburg, supported the ruling, saying the start-up should operate by the same rules as other German taxi companies.

“We welcome fair competition and a level playing field for all market participants,” Hermann Waldner, chief executive of the rival European taxi app taxi.eu, said in a statement. “The taxi industry is now more in demand than ever before, and this judgment is a step in the right direction.”

Last month, Uber won a reprieve in Berlin when a court there suspended a ban by the city’s authorities, which had ruled that Uber did not comply with passenger safety standards.

This summer, more than 10,000 taxi drivers in cities including Madrid and London took to the streets to complain about Uber, which they said did not comply with local rules regulating the industry.

Taxi drivers and customers in several United States cities have also criticized the company’s tactics. Uber has been accused of trying to hire drivers from rival services like Lyft, and some of Uber’s drivers have even been arrested.