A Syrian refugee suing Facebook over “fake news” falsely accusing him of terrorism says he has a “good feeling” about the outcome of the landmark case.

Anas Modamani’s chance selfie with Angela Merkel at his shelter in Berlin went viral in 2015, with the initially positive reaction becoming increasingly sinister after a wave of terror attacks in Europe.

The teenager’s picture was used in Facebook posts accusing him of links to terrorist attacks and the attempted murder of a homeless man in Berlin, with the images remaining online despite a series of attempts to have them removed.

Anas Modamani, a teenage Syrian refugee, took a selfie with Angela Merkel when she visited his shelter in Berlin on 10 September 2015 (Anas Modamani)

Mr Modamani, now 19, is now suing Facebook for damages and seeking an injunction that would force the social media giant to actively search for and remove such posts, rather than wait for users to flag violations of the site’s “community standards”.

His lawyer, Chan-jo Jun, said that Facebook has a legal responsibility to remove defamatory or discriminatory content that violates German law.

“Instead, Facebook has created an environment that allows illegal content to thrive,” he told The Independent, saying malicious posts about Mr Modamani had remained online despite repeated complaints.

Mr Jun said that the legal community has a “chance to curb fake news, at least where the rights of individuals are violated”, and hopes his case could set a precedent for the future.

It also names a politician from the anti-immigrant Alternative for Germany party, who was allegedly among hundreds of people who shared one of the posts featuring the Syrian refugee’s picture.

The case opened at Würzburg district court on Monday, with the courtroom packed with journalists and supporters.

Martin Munz, a lawyer representing Facebook, told the court that a billion pieces of content can be uploaded to the site in a single day, and that a “miracle machine” would be needed to sort through it.

Refugees settle in Germany Show all 12 1 /12 Refugees settle in Germany Refugees settle in Germany Germany Mohamed Zayat, a refugee from Syria, plays with his daughter Ranim, who is nearly 3, in the one room they and Mohamed's wife Laloosh call home at an asylum-seekers' shelter in Vossberg village on October 9, 2015 in Letschin, Germany. The Zayats arrived approximately two months ago after trekking through Turkey, Greece and the Balkans and are now waiting for local authorities to process their asylum application, after which they will be allowed to live independently and settle elsewhere in Germany. Approximately 60 asylum-seekers, mostly from Syria, Chechnya and Somalia, live at the Vossberg shelter, which is run by the Arbeiter-Samariter Bund (ASB) charity 2015 Getty Images Refugees settle in Germany Germany A refugee child Amnat Musayeva points to a star with her photo and name that decorates the door to her classroom as teacher Martina Fischer looks on at the local kindergarten Amnat and her siblings attend on October 9, 2015 in Letschin, Germany. The children live with their family at an asylum-seekers' shelter in nearby Vossberg village and are waiting for local authorities to process their asylum applications. Approximately 60 asylum-seekers, mostly from Syria, Chechnya and Somalia, live at the Vossberg shelter, which is run by the Arbeiter-Samariter Bund (ASB) charity Getty Images Refugees settle in Germany Germany Kurdish Syrian asylum-applicant Mohamed Ali Hussein (R), 19, and fellow applicant Autur, from Latvia, load benches onto a truckbed while performing community service, for which they receive a small allowance, in Wilhelmsaue village on October 9, 2015 near Letschin, Germany. Mohamed and Autur live at an asylum-applicants' shelter in nearby Vossberg village. Approximately 60 asylum-seekers, mostly from Syria, Chechnya and Somalia, live at the Vossberg shelter, which is run by the Arbeiter-Samariter Bund (ASB) charity Getty Images Refugees settle in Germany Germany Mohamed Ali Hussein ((L), 19, and his cousin Sinjar Hussein, 34, sweep leaves at a cemetery in Gieshof village, for which they receive a small allowance, near Letschin Getty Images Refugees settle in Germany Germany Mohamed Zayat, a refugee from Syria, looks among donated clothing in the basement of the asylum-seekers' shelter that is home to Mohamed, his wife Laloosh and their daughter Ranim as residents' laundry dries behind in Vossberg village on October 9, 2015 in Letschin, Germany. The Zayats arrived approximately two months ago after trekking through Turkey, Greece and the Balkans and are now waiting for local authorities to process their asylum application, after which they will be allowed to live independently and settle elsewhere in Germany Getty Images Refugees settle in Germany Germany Asya Sugaipova (L), Mohza Mukayeva and Khadra Zhukova prepare food in the communal kitchen at the asylum-seekers' shelter that is their home in Vossberg village in Letschin Getty Images Refugees settle in Germany Germany Efrah Abdullahi Ahmed looks down from the communal kitchen window at her daughter Sumaya, 10, who had just returned from school, at the asylum-seekers' shelter that is their home in Vossberg Getty Images Refugees settle in Germany Germany Asylum-applicants, including Syrians Mohamed Ali Hussein (C-R, in black jacket) and Fadi Almasalmeh (C), return from grocery shopping with other refugees to the asylum-applicants' shelter that is their home in Vossberg village in Letschin Getty Images Refugees settle in Germany Germany Mohamed Zayat (2nd from L), a refugee from Syria, smokes a cigarette after shopping for groceries with his daughter Ranim, who is nearly 3, and fellow-Syrian refugees Mohamed Ali Hussein (C) and Fadi Almasalmeh (L) at a local supermarket on October 9, 2015 in Letschin, Germany. All of them live at an asylum-seekers' shelter in nearby Vossberg village and are waiting for local authorities to process their asylum applications, after which they will be allowed to live independently and settle elsewhere in Germany 2015 Getty Images Refugees settle in Germany Germany Kurdish Syrian refugees Leila, 9, carries her sister Avin, 1, in the backyard at the asylum-seekers' shelter that is home to them and their family in Vossberg village in Letschin Getty Images Refugees settle in Germany Germany Somali refugees and husband and wife Said Ahmed Gure (R) and Ayaan Gure pose with their infant son Muzammili, who was born in Germany, in the room they share at an asylum-seekers' shelter in Vossberg village on October 9, 2015 in Letschin, Germany. Approximately 60 asylum-seekers, mostly from Syria, Chechnya and Somalia, live at the Vossberg shelter, which is run by the Arbeiter-Samariter Bund (ASB) charity, and are waiting for authorities to process their application for asylum 2015 Getty Images Refugees settle in Germany Germany German Chancellor Angela Merkel pauses for a selfie with a refugee after she visited the AWO Refugium Askanierring shelter for refugees in Berlin Getty Images

Judge Volkmar Seipel, who admitted he was not a Facebook user himself, adjourned the case until 7 March for time to assess both sides.

“An amicable agreement is not possible today,” he said at the close of a 40-minute hearing.

The judge will make a ruling next month, unless Facebook and Mr Modamani’s representatives reach an out-of-court settlement in the interim period.

The Syrian refugee, who now lives in Berlin with a German family, said he was returning home “with a good feeling”.

Mr Modamani had only been in Germany for a couple of weeks after journeying across the Aegean Sea and through the Balkans from a war-torn suburb of Damascus when he snapped his chance photo with Ms Merkel.

But the teenager had no idea that an agency photographer standing metres away had captured the moment on camera, with the image going viral in a matter of hours and dominating international news coverage.

It was swiftly picked up by far-right activists and groups in hate-fuelled social media posts that evolved into “fake news” stories spread on Facebook, accusing Mr Modamani of terrorism and attempted murder.

Among them is a combination of his selfie with CCTV images of one of the Brussels bombers, alleging he was among Isis militants who attacked the Belgian capital, with the caption “you reap what you sow”.

One of the Facebook posts, which remains available on the site, falsely accusing Anas Modamani of involvement in an attack on a homeless man in Berlin

The jihadis were identified, but Mr Modamani remained a target. As the hunt continued for the man who rammed a lorry into a Christmas market in Berlin in December, his photo popped up again.

It was superimposed on photos of the wreckage from the massacre in a mock news story with the headline “They are Merkel’s dead”.

Then, after a homeless man was set on fire by seven migrants at a Berlin underground station over Christmas, Mr Modamani was falsely alleged to be among the suspects.

The lies were repeated on Twitter and on websites posing as “anti-mainstream media” news outlets, where the articles remain.

He hoped the false stories would die down but as malicious claims continued to surface in new incarnations, an activist group that debunked the allegations put him in touch with a lawyer.

“I came to Germany because I wanted to live in peace, away from danger,” Mr Modamani told The Independent ahead of the court case.

“I don’t want anyone to continue using my photo on Facebook. I want to live in peace without any problems.”

A spokesperson for Facebook said it took down one piece of content that “violates Mr Modamani's right of personality” at his lawyer’s request, adding: “Access to that reported content was quickly disabled, so we do not believe there is any basis for him to seek an injunction.”