A German antitrust watchdog ruled Thursday that Facebook must stop collecting some data without users’ consent.

The Federal Cartel Office, known as the Bundeskartellamt, published its findings after a three-year investigation.

It ruled that Facebook will no longer be able to freely collect data from third-party services and websites and merge that data with Facebook’s users' profiles — a practice that allows it to create a much more attractive product for advertisers.

Facebook says it will appeal the decision, accusing the German watchdog of unfairly targeting the tech giant.

Currently, Facebook collects data from services such as its own WhatsApp messaging platform and the Instagram photo-sharing app, as well as third-party websites that install Facebook’s own Like and Share buttons.

But the German watchdog says that merging these data sources can no longer happen without the explicit consent of the users.

“In future, Facebook will no longer be allowed to force its users to agree to the practically unrestricted collection and assigning of non-Facebook data to their Facebook user accounts,” Andreas Mundt, president of the Bundeskartellamt, said.

Mundt argued that Facebook’s data collection policies allowed it to become the dominant player in the market. He said that if users refused to have their external data merged with their Facebook data, the company could not refuse them access to the social network.

No monetary fine was imposed by the regulator.

The watchdog ruled that Facebook can continue to collect the data from third-party sources, but it could not automatically merge that data with user profiles without gaining the approval of the user.

While the ruling only impacts Facebook’s operations in Germany, the decision could impact regulators in other European countries, where Facebook is already facing a significant push back against its data collection policies.

The company has one month to appeal the decision, and in a blog post Thursday Yvonne Cunnane, Head of Data Protection, and Nikhil Shanbhag, Associate General Counsel, indicated they would be doing just that.

“The Bundeskartellamt underestimates the fierce competition we face in Germany, misinterprets our compliance with GDPR and undermines the mechanisms European law provides for ensuring consistent data protection standards across the EU,” the executives said.

If the ruling is upheld, then the company would have four months to show how it intends to comply with the order, with a further eight months to implement those changes.

But there has already been some push back against the German regulator’s decision.

“This ruling represents a power grab by German authorities that will create confusion throughout the European Union and roll back the hard-won gains the European Commission has made in moving toward the Digital Single Market,” Rob Atkinson, president of Information Technology and Innovation Foundation, a Washington-based tech think tank, said in an emailed statement.

The ruling is the latest blow to Facebook, which has faced attacks from governments and regulators across the globe for failures in data protection, hate speech, and the weaponization of the platform by bad actors to spread disinformation.

In Germany, Facebook and other Silicon Valley giants such Google and Twitter are already under significant pressure to rid their platforms of hate speech in a timely manner or face fines of up to $57 million.