Officials have not identified the husband, but German news media have reported he is an ISIS member, believed to be living in the region where Iraq borders Turkey.

If convicted, Jennifer W. faces a maximum sentence of life in prison.

The trial “is important for all Yazidi survivors,” said Nadia Murad, a Yazidi activist who survived being forced into sexual slavery by ISIS and went on to be awarded the Nobel Peace Prize. “Every survivor I have met and spoken to is waiting for the same thing — for the perpetrators to be prosecuted for their crimes against Yazidis, including women and children.”

The mother of the girl was found with the help of Yazda, an organization that has been documenting crimes committed against the Yazidi minority since 2015.

Germany is struggling with how to handle dozens of women who left the country for Syria and Iraq, many of whom married ISIS fighters, and now have children who are German citizens. While they are legally allowed to return home, many Germans do not want to see them allowed back without being tried for their roles in supporting the terror organization.

But German law requires concrete proof of wrongdoing, so without evidence like photos showing them posing with weapons, or social media accounts where they spread propaganda or sought to recruit others, it can be difficult to bring charges against them.

In the case of Jennifer W., prosecutors were helped by her own eagerness to tell the man who offered to drive her as far as Turkey about her life in ISIS. American intelligence officials had tipped off their colleagues in Germany about the woman, allowing the Germans to set her up with a driver, whose car was bugged, German news media reported.

She told the driver about leaving her home in northwestern Germany in August 2014, and making her way through Turkey and Syria to Iraq. Once she arrived, prosecutors said, she joined the Islamic State and swiftly rose through the ranks, becoming a member of the Hisbah, the morality police, patrolling the parks of the Iraqi cities of Falluja and Mosul.