A Syrian refugee whose selfie with German Chancellor Angela Merkel was spread on Facebook in fake news reports about terrorist attacks has lost his case against the social network.

Anas Modamani sued Facebook in Germany earlier this year after his 2015 picture with Merkel began showing up in fake news posts falsely linking him to attacks in Brussels and Berlin. Modamani had sought an injunction to keep Facebook users from posting any version of the selfie in fake news stories. He also wanted the social network to delete any such existing posts.

A judge on Tuesday found Facebook was “neither perpetrator nor participant in the undisputed slander,” according to a CNN report. Because the company hadn’t altered the content, it wasn’t legally responsible for its distribution, leading Judge Volkmar Seipel to find no grounds for an injunction, according to a The New York Times report.

Get Breaking News Delivered to Your Inbox

“We appreciate that this is a very difficult situation for Mr Modamani,” a Facebook spokesperson said in response to the ruling. “That is why we quickly disabled access to content that has been accurately reported to us by Mr. Modamani’s legal representatives, and will continue to respond quickly to valid reports of the content at issue from Mr. Modamani’s legal representatives.”

“We are pleased that the Court shares our view that legal action was not merited or the most effective way to resolve the situation,” the company added. Facebook also said it will continue to follow German law relating to content shared on its site.

Chan-Jo Jun, Modamani’s lawyer, didn’t immediately respond to a request for comment.

The proliferation of fake news, or false information, gained widespread attention in last year’s US presidential election. The term fake news has morphed since then and is sometimes used, including by President Donald Trump, as a label to try to discredit factual stories by the mainstream media.

Tech giants like Facebook and Google have struggled to stop fake news from appearing on their sites. The two companies teamed up in February to launch an initiative in Europe called CrossCheck aimed at curbing the problem.