BERLIN — A German woman has been sentenced to five years in prison for membership in the Islamic State group.

The regional court in the southwestern German city of Stuttgart had earlier Friday convicted the 32-year-old defendant of joining a foreign terrorist organization.

The woman, who was identified only as Sabine Ulrike Sch. Because of German privacy rules, lived in Syria from late 2013 to August 2017.

Prosecutors said she married an IS fighter, living with him in houses seized by the group. She allegedly received weapons training between 2014 and mid-2017 and wrote blogs praising life in IS-controlled territory. Her husband died in fighting in 2016.

The woman was captured by Kurdish forces in September 2017 along with the wives of other IS fighters and returned to Germany in April 2018.