In October a new law comes into force in Germany that will impose huge fines on social networks if they don't delete illegal content including hate speech. It's touched off a huge debate over freedom of expression and has attracted an unusual collection of opponents.
The law is called Netzwerkdurchsetzungsgesetz - NetzDG for short. It obliges the biggest social networks - those with more than two million German users - to take down "blatantly illegal" hate speech within 24 hours of it being reported. For material that's less obviously violating the law, networks such as Facebook and Instagram will have seven days to consider and, if appropriate, delete posts. Failure to meet these deadlines could lead to fines of up to €50m.
Critics argue the short timeframes coupled with the potentially large fines will lead social networks to be overly cautious and delete huge amounts of content - even things that are perfectly legal. But the law's supporters, and the German government, argue that it will force social media companies to proactively deal with online incitement and hate speech.
What counts as 'illegal hate speech' in Germany?
The law doesn't actually change what's considered hate speech in Germany. No new offences are created. The law simply cites sections of the German Criminal Code which details illegal speech online. The categories range from "forming terrorist organisations", to the much vaguer "defamation of religions, religious and ideological associations."
In addition, German law restricts some types of speech that are allowed in many other countries. For instance, the use of Nazi symbols is banned, as are the symbols and flags of some extremist groups.
An earlier draft of the NetzDG bill barred "defamation of the President of the Federation", but the clause was removed after criticism. The law has also been criticised for containing no legal mechanism for people whose posts are wrongly deleted to appeal to get them reinstated.
You might also be interested in:
So who is worried?
Opposition has come from a wide range of groups and politicians on both the left and right - and Facebook has also made its disagreement with the law clear.
The United Nations has also weighed in. David Kaye, the UN's Special Rapporteur on Freedom of Expression, has written to the German government to warn about the potential consequences of the law.
"With these 24 hour and seven day deadlines - if you are a company you are going to want avoid fines and bad public branding of your platform," he says. "If there is a complaint about a post you are just going to take it down. What is in it for you to leave it up? I think the result is likely to be greater censorship."
The group Reporters without Borders says the German law has already inspired a "draconian" new online media law in Russia.
But there are voices in Germany who are in favour of the law and who argue that making social networks more responsible for hate speech and illegal content on their platforms is a good thing.
Anas Modamani is a refugee from Syria who now lives in Berlin. In August 2015 he was catapulted to notoriety for taking a selfie with Angela Merkel while she was visiting a migrant shelter.
But the picture would come back to haunt him, as it was used to accuse him of attacks in Brussels and Berlin. His famous photograph was cropped and pasted into wanted posters and false news reports.
"When I read the fake news on the internet, I really cried, it was really bad in my life, it was all untrue," Modamani says.
He decided to take Facebook to court for not doing enough to stop the lies being shared about him, but in March 2017 he lost the case. The court ruled Facebook had taken enough measures to attempt to block defamatory images of him for users in Germany.
Because of his experiences, Modamani is a supporter of NetzDG.
"I think the law is a good idea because people will be a little bit afraid, they can't just write what they want," he says. "I don't mind if other comments get deleted along with the bad ones."
Modamani's lawyer, Chan-Jo Jun, is also optimistic about the new law, and plans to use it immediately after it comes into effect.
"I regularly report the post that was the subject of the [earlier] trial and I keep getting the answer [from Facebook] that it does not violate community standards," Jun says. "Therefore it is still online. After October I will file a complaint against Facebook under the NetzDG - with the NetzDG, the court case would not have been necessary."
On the other side of the legal debate is attorney Joachim Steinhoefel. While Chan-Jo Jun has taken Facebook to court to get them to remove posts, Steinhoefel has threatened the company with legal action to get a post reinstated.
In May, photojournalist Markus Hibbeler wrote a Facebook post about Islam and freedom of expression. Translated from German, the post read in part: "We shouldn't shield Muslims, and certainly not Islam, which has never been through an enlightenment or reformation, from criticism and constantly protect them."
His post was deleted by Facebook and his account was suspended for seven days. Hibbeler, with Steinhoefel's help, threatened to sue Facebook if the post wasn't put back up within a week and his account reinstated. They succeeded, and Facebook reinstated the post and apologised.
It's cases like Hibbeler's, Steinhoefel says, that show how NetzDG threatens freedom of expression. He says he doesn't trust Facebook to decide what posts are legal and illegal and thinks the most likely outcome will be a mass deletion of legal posts that Facebook doesn't want to take any risks with, out of an abundance of caution.
The attorney has started a blog where he posts examples of Facebook deleting posts which he says break no laws. The blog also catalogues what Steinhoefel says are blatantly illegal posts which Facebook hasn't removed.
For example, one of the latter posts reads: "Jews to the gas chambers". Facebook has not removed it, despite it being reported to the company.
"It goes to show how unprofessional they are in dealing with this content," Steinhoefel says. He is suspicious of the real motive behind the new law and says it will allow "the media and political elite to regain control over the political debate in Germany."
"The law is superfluous," he says. "The law as it is right now in Germany makes Facebook responsible for illegal content on its site from the moment they know about it. It just takes state prosecutors and courts to implement these laws."
The German government, however, is determined to press forward with NetzDG. Gerd Billen, a State Secretary in the German Ministry of Justice, says that although existing laws oblige Facebook to delete illegal comments "there are no rules about when they have to do it, how they have to organise and what their complaint management system should look like."
"There is a fear of 'over-blocking' but the reality is 'under-blocking'," Billen says. "They don't block enough. We don't believe there will be a problem (with over-blocking) because the social networks want to keep their customers."
Also from Trending:
Billen downplays concerns about freedom of speech, and points out that social media companies already censor content that is perfectly legal.
"There is no obligation for any private company in Germany or somewhere else in the world to guarantee freedom of speech," he says. "To guarantee freedom of speech is something a government does but not private companies. I didn't find any notice in the terms and conditions of Facebook that the company will respect freedom of speech.
"For example they delete many things that are allowed in Germany. Facebook don't accept naked people on their platform. They can decide if they don't want it, so they delete it."
Opposition from social media companies
A Facebook spokesperson admitted to the BBC that they can't rule out the possibility of legal content being deleted.
"The law is not the right way to fight hate speech online," the spokesperson says. "It provides an incentive to delete content that is not clearly illegal and would have the effect of transferring responsibility for complex legal decisions from public authorities to private companies.
"Several legal experts have assessed the draft law as being against the German constitution and non-compliant with EU law. Facebook is committed to working in partnership with governments and civil society on solutions that would have made this law unnecessary."
The BBC also learnt that although the company will soon have another 500 content moderators based in Essen, in western Germany, Facebook has not hired any new staff in response to the law.
"We are still evaluating what the law really means for us," the spokesperson says.