Rabat - A Moroccan man who fled Spain last month has been detained by German police over suspected links to the so-called terror group the Islamic State, AFP reported.