The ruling by the Federal Court of Justice, upholding a decision by Germany's antitrust watchdog, is a major victory for proponents of tougher regulation of the world's largest technology companies. The case had been closely watched after German regulators used a novel interpretation of competition law to rule against the social media giant last year.
The authorities said Facebook broke competition laws by combining data it collected about users across its different platforms, including WhatsApp and Instagram, as well as from outside websites and third-party apps. In Germany, Facebook now must alter how it processes data about its users. It was ordered to allow people to block the company from combining their Facebook data with information about their activities on other apps and websites.
The decision is a direct shot at Facebook's business model, which relies on collecting reams of data about people in order to offer more targeted advertising.
The authorities argued that Facebook unfairly used its dominance to collect data about millions of users of third-party sites that used tools like Facebook's "like" and "share" buttons, and an analytics service called Facebook Pixel.
Regulators concluded that consumers faced a false choice: Agree to hand over vast amounts of personal data or not use Facebook's ubiquitous social media services at all.
A lower court still must issue a ruling on the matter, a process some antitrust attorneys view as a formality given the high court's strong-worded ruling. In theory, the lower court could rule in Facebook's favour, setting up another appeal to the federal high court.
German officials could send the matter to the European Court of Justice, the European Union high court that resolves many thorny legal questions from member states.