BERLIN - German anti-trust watchdog said Thursday it had prohibited Facebook from collecting data from sources outside of the social network's website and assigning it to users' accounts, which helped it build exceptional databases for users and become a market powerhouse.

"Facebook-owned services like WhatsApp and Instagram can continue to collect data. However, assigning the data to Facebook user accounts will only be possible subject to the users’ voluntary consent. Where consent is not given, the data must remain with the respective service and cannot be processed in combination with Facebook data… Collecting data from third party websites and assigning them to a Facebook user account will also only be possible if users give their voluntary consent," Bundeskartellamt said in a statement.

The watchdog added that Facebook would have to limit collecting and combining data if users did not give their consent.

"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. The combination of data sources substantially contributed to the fact that Facebook was able to build a unique database for each individual user and thus to gain market power," Bundeskartellamt's president Andreas Mundt was quoted as saying.

Over the past several months, Facebook has been embroiled in a number of scandals related to data breach and faced accusations of selling user data, which the company itself has denied.

Last month, an investigation by TechCrunch revealed that the company paid people up to $20 per month to install a "Facebook Research" VPN app that gained access to users' private information.