BERLIN — A judge has ordered a 19-year-old Syrian migrant suspected of plotting a bomb attack in Germany kept in custody pending a possible indictment.

The man, identified only as Yamen A. in line with German privacy rules, was arrested Tuesday in the northeastern city of Schwerin. Prosecutors said he was brought before a judge at a closed-doors hearing Wednesday and ordered held on suspicion of preparing a serious act of violence.

Authorities say he had procured chemicals used to make the explosive TATP and other bomb-making materials usually used to build a remote-controlled bomb. They see no evidence that he was a member of a terror group.

Interior Ministry spokeswoman Sonja Kock said Wednesday the suspect sought asylum in September 2015. He was granted a three-year residence permit in April 2016.