BERLIN — German prosecutors say they are formally charging a 24-year-old Syrian man suspected of fighting for the Islamic State and other extremist groups in his home country.

Federal prosecutors say Majed A., whose surname wasn't provided in line with privacy rules, is accused of membership in a foreign terrorist organization and of weapons violations.

The suspect was arrested in the northern state of Schleswig-Holstein last September.

Prosecutors say A. joined the Owais al-Qorani brigade in the Syrian city of Tabqa in 2013 to fight against the government of Bashar Assad. He then allegedly moved to other groups before joining IS in late 2014 or early 2015 and taking part in fighting against Kurdish militias.

The suspect is alleged to have entered Germany during the summer of 2015.