The three dozen shaken men brought before a jihadi cleric in Tabqa, Syria were sentenced to death. Al Qaeda-linked militants had captured the men, all members of the Assad regime security forces, when they took the city of Raqqa and asked the Islamic jurist for guidance on what to do with them.

Now, with the sentence handed down, the militants dragged the men—soldiers, militia, and police—to a garbage dump in Tabqa and let the cleric draw first blood, which he did by stoning a man to death. The militants took the remaining captives, bound and gagged, and executed them in groups of five to six before throwing their bodies into a natural hollow at the dump.

Years later, one of the men allegedly behind the massacre would move to Europe and begin building a new life—which might have worked if not for the breadcrumbs he and other militants reportedly left for war crimes investigators on YouTube and Facebook. Now, U.S. prosecutors are helping German authorities prosecute the man, Abdul Jawad al-Khalaf, for war crimes.

Court documents show that U.S. law enforcement has been helping Germany try to prove Khalaf’s role in the brutal massacre and other crimes since at least June 2018, when a warrant application was filed in federal court in Washington, D.C.

German prosecutors charged Khalaf in April 2017 with war crimes and terrorism charges, but have released few details about the case. They say Khalaf, a Syrian national who later fled to Germany, formed his own fighting unit dubbed “Katiba Mohamed Ibn Abd Allah” in 2012 and fought under the command of Jabhat al-Nusra, which pledged allegiance to al Qaeda in November 2013. In March of that year, Nusra and other rebel groups wrested control of the city of Raqqa in northern Syria and Khalaf’s unit captured 36 prisoners from Assad regime forces.

A video of the prisoners was posted to YouTube in March 2013 shortly before the men’s execution, according to the warrant. In the video, militants say the men were captured at the governor’s palace in Raqqa and are the captives of Katiba Mohamed Ibn Abd Allah led by Abu Jandal, which prosecutors claim is a battlefield nickname used by Khalaf, and another local militant group. “We will follow these hostages with the others in the coming days; maybe in the next hours,” a man says in the film.

Khalaf’s alleged role in the execution may have remained a secret but for the confession of a self-professed ISIS member in France. In February 2016, a Syrian refugee, Saleh Alghadban, turned himself in to French authorities, confessed to membership in ISIS, and identified Khalaf and others as part of a cell plotting attacks in Germany, according to the warrant.

Alghadban claimed he fought in Tabqa in 2013 with a militant group that later joined ISIS and knew many of the militants fighting there, including Khalaf. He told French police that he was a member of ISIS and identified Khalaf and others as supposed participants in a plot to carry out a Paris-style attack in Dusseldorf with rifle-toting suicide bombers.

German police arrested three men based on his information in June 2016, but Alghadban’s story soon fell apart. He confessed to inventing the story as part of a bid to ensure asylum in France.

The investigation of Khalaf didn’t end with the informant’s lie though. Two months after the Dusseldorf arrests, an asylum seeker in Germany named “Alhaz” told German authorities during an asylum hearing that he had fought in Khalaf’s unit in Syria, and he detailed its membership and operations. Alhaz’s information led authorities to another witness in the Netherlands—identified only as “Witness 1” in the warrant application—who had worked as the head of a rebel media outlet in Tabqa, Syria, where the massacre had taken place.

“Witness 1” told police he had witnessed the massacre after militants asked him to film the executions. The man claimed to have refused, but said he saw Khalaf execute prisoners and direct his men to join in. Khalaf allegedly discussed the executions with the unidentified witness over Facebook in the fall of 2014 when both men had fled to Europe. He claimed that Khalaf showed up at his home in the Netherlands and threatened him and his family if he didn’t delete the Facebook messages about the executions.

When German authorities asked to see the messages, the witness was unable to share them because of an apparent suspension of his account by Facebook. Federal law enforcement in Washington, D.C. asked a judge to grant them a warrant for the man’s Facebook data in the hope that they could retrieve records of the prisoner execution conversation. The FBI received the data from Facebook in August 2018.

Khalaf is still on trial in Germany.

European law enforcement agencies have faced an increasing workload of war crimes cases as many suspected war criminals have sought to hide among refugees fleeing Iraq and Syria. Germany, in particular, has prosecuted a number of cases involving former ISIS and al Qaeda members. Among the most notorious was the December 2018 arrest of an ISIS member charged with leaving a Yazidi girl she kept as a slave to die of thirst outside her home in Iraq.

In September 2017, the United Nations adopted a resolution which created an investigative team to investigate ISIS war crimes.