A judge on Sunday ordered that a Lebanese student suspected of planting one of two bombs that failed to explode on German trains be held in custody pending possible terrorism charges, federal prosecutors said. The 21-year-old was detained Saturday in the northern port city of Kiel, where he lived and studied. Prosecutors say he was identified with the help of surveillance footage from Cologne station, where the suitcase bombs allegedly were planted July 31, and DNA traces on the cases. A judge at the Federal Court of Justice in Karlsruhe issued a formal arrest warrant against the man Sunday, allowing him to be kept in custody, federal prosecutors said in a statement. He was identified only as Youssef Mohamad E.H. He is being held on suspicion of membership in a German-based terrorist organization, attempted murder and attempting to cause an explosion. Prosecutors alleged that the aim was "to kill a large number of people." Investigators are still seeking a second suspect - another man seen with heavy luggage in the grainy video footage from Cologne. The devices, made with gas canisters, were found on board trains in Dortmund and Koblenz. They apparently were supposed to explode simultaneously, 10 minutes before the trains arrived at their destinations, but failed to go off. The arrested student allegedly planted the bomb on the Koblenz-bound train, but got off before the planned detonation. Prosecutors said the second suspect apparently boarded the other train. Investigators have said it was possible the would-be attackers might have wanted to send a message related to fighting in the Middle East, but were tightlipped on possible motives after the suspect's arrest. Prosecutors note that the alleged plot would have required complex logistical preparation, and say they suspect that the arrested man was part of a larger group. His apartment at a student residence in Kiel was searched, along with an adjoining workshop, but no explosive components were found, prosecutors said Sunday.