The measure is designed to enforce the country's existing limits on speech, including the long-standing ban on Holocaust denial. Among other things, it would fine social networking sites up to 50 million euros ($56 million) if they continuously fail to remove illegal content within a week, including defamatory "fake news." The law is set to take effect in October.
"Freedom of speech ends where the criminal law begins," said Justice Minister Heiko Maas, the driving force behind the bill. Maas said official figures showed the number of hate crimes in Germany increased by over 300% in the last two years.
Social media platforms such as Facebook, Google, and Twitter have become a battleground for angry debates about Germany's recent influx of more than one million refugees, with authorities struggling to keep up with the flood of criminal complaints.
Maas claimed that 14 months of discussion with major social media companies had made no significant progress. Last week, lawmakers from his Social Democratic Party and Chancellor Angela Merkel's center-right Union bloc agreed on a number of amendments to give companies more time to check whether flagged posts are illegal, delegate the vetting process to a third party, and ensure that users whose comments are removed can appeal the decision.
But human rights experts and the companies affected warn that the law risks privatizing the process of censorship and could have a chilling effect on free speech.
"This law as it stands now will not improve efforts to tackle this important societal problem," Facebook said in a statement.
"We feel that the lack of scrutiny and consultation do not do justice to the importance of the subject. We will continue to do everything we can to ensure safety for the people on our platform," the company said, noting that it's hiring 3,000 additional staff on top of 4,500 already working to review posts.
Aside from the hefty fine for companies, the law also provides for fines of up to five million euros for the person each company designates to deal with the complaints procedure if it doesn't meet requirements.
Social networks also have to publish a report every six months detailing how many complaints they received and how they dealt with them.
Among those cheering the law was Germany's main Jewish organization, which called it a "strong instrument against hate speech in social networks." The country has criminalized Holocaust denial for a long time — a response to the country's Nazi-era history of allowing racist ideas to become genocidal policy.
"Jews are exposed to anti-Semitic hatred in social networks on a daily basis," the Central Council of Jews said in a statement. "Since all voluntary agreements with platform operators produced almost no result, this law is the logical consequence to effectively limit hate speech."
The nationalist Alternative for Germany Party, which has frequently been accused of whipping up sentiments against immigrants and minorities, said it is considering challenging the law in Germany's highest court.