Ayoub El Khazzani, a 25-year-old Moroccan, flew from Berlin's Tegel airport to Istanbul on May 10th.
But on his way through security he was stopped by federal police, who were alerted to his journey while he was passing through passport control, Berlin broadcaster RBB reported on Monday evening.
French authorities had added El Khazzani to a watch list, but had not designated him a “foreign fighter” who might be on his way to join a violent terrorist organization in the Middle East.
German police would have been able to detain the future gunman if he had been given this classification.
A federal police spokesman contacted by The Local confirmed that Ayoub had been questioned but could not release any further information.
Known to authorities for months
El Khazzani had been known to European authorities, including German police, for months as a potentially dangerous jihadist, RBB reported.
It is not known how long he spent in Berlin or whether he was in contact with Islamists in Germany.
Several passengers, including two off-duty American servicemen, were able to stop the gunman in the Thalys train on Friday before he was able to fire more than a few shots.
Acquaintances from Madrid said on Monday that Khazzani was a small-time hashish dealer and seemed like a “normal guy” who gave no indication of jihadist leanings.
French prosecutors have just hours remaining to decide whether to charge Khazzani under terrorism laws, for some other offense, or to request an extension to the deadline.