In a blow to Facebook's business model, Germany's highest court has ruled that the social media giant abused its dominant position to collect and pool user data, upholding an earlier ruling by Germany's antitrust watchdog, the Cartel Office.

"There are no serious doubts about Facebook's dominant position on the German market for social networks, nor that Facebook is abusing this dominant position with the terms of use prohibited by the Cartel Office," the court in Karlsruhe said in a statement.

Facebook must now give German users the choice of how the company can use data it collects from its own platform and from its WhatsApp and Instagram sites, as well as information gathered from third parties.

The ruling comes at a time when social media giants are running up against both EU and national regulators' concerns that the companies are abusing their dominant positions to block competitors and unfairly expand their businesses.

Last year, EU antitrust regulators opened a probe into how Facebook collects and monetizes its data. And the New York Times recently reported that European Union officials are preparing to bring charges against Amazon for using its market position to quash rivals.

"Data are a decisive factor for economic power and for the assessment of market power on the Internet," Andreas Mundt, head of the Cartel Office, told German broadcaster ARD. If data is collected and used illegally, he added, competition law must intervene in order to prevent the abuse of market power.

Facebook said in a statement that the ruling concerned preliminary proceedings.

"The main proceedings, before the court of appeals, are ongoing and we will continue to defend our position that there is no antitrust abuse," the company said.