Google said on Tuesday that it was taking legal action over an expanded version of Germany's hate-speech law that recently took effect, saying its provisions violated the right to privacy of its users.
The Alphabet unit, which runs video-sharing site YouTube, filed suit at the administrative court in Cologne to challenge a provision that allows user data to be passed to law enforcement before it is clear any crime has been committed.
The request for a judicial review comes as Germany gears up for a general election in September, amid concerns that hostile discourse and influence operations conducted via social media may destabilise the country's normally staid campaign politics.
"This massive intervention in the rights of our users stands, in our view, not only in conflict with data protection, but also with the German constitution and European law," Sabine Frank, YouTube's regional head of public policy, wrote in a blog post.
Germany enacted the anti-hate speech law, known in German as NetzDG, in early 2018, making online social networks YouTube, Facebook and Twitter responsible for policing and removing toxic content.
The law, which also required social networks to publish regular reports on their compliance, was widely criticised as ineffective, and parliament in May passed legislation to toughen and broaden its application.
Google has taken particular issue with a requirement in the expanded NetzDG that requires providers to pass on to law enforcement personal details of those sharing content suspected to be hateful.
Only once that personal information is in the possession of law enforcement is a decision foreseen on whether to launch a criminal case, meaning that data of innocent people could end up in a crime database without their knowledge, it argues.
"Network providers such as YouTube are now required to automatically transfer user data en masse and in bulk to law enforcement agencies without any legal order, without knowledge of the user, only based on the suspicion of a criminal offence," a Google spokesperson said.
"This undermines fundamental rights, we have therefore decided to have the relevant provisions of the NetzDG judicially reviewed by the competent administrative court in Cologne."