German authorities on Saturday arrested a Lebanese student suspected of helping plant two bombs that failed to explode on trains last month, officials said.

The 21-year-old was detained a day after investigators released surveillance camera footage from July 31, the day of the attempted bombing, showing two men with heavy luggage who were believed to have planted the devices.

The man was arrested early Saturday morning at the main station in the Baltic Sea port city of Kiel, where he lived and studied. Chief prosecutor Monika Harms said he apparently had planned to flee the country, but she did not say where he wanted to go.

Prosecutors said the suspect was identified with the help of the surveillance footage, from Cologne station, and DNA traces from one of the suitcases in which the bombs were found.

Joerg Ziercke, the head of Germany's Federal Crime Office, told reporters in Kiel he was confident that "we caught the right suspected bomb planter here in Kiel today."

The devices, made with gas canisters, were found on board trains in Dortmund and Koblenz, both of which had stopped in Cologne. They apparently were supposed to explode simultaneously, 10 minutes before the trains arrived at those stations.

A torn scrap of paper with Arabic script listing groceries and phone numbers in Lebanon was found in clothing surrounding one gas canister. Small bags of starch, also from Lebanon and available in Germany, also were found.

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 Saturday on possible motives.

Other open questions include "what contacts this person has in Germany, whether he has contacts abroad, are there people behind this ... whether there are networks, whether Islamist terrorism plays a role," Ziercke told a news conference.

Chancellor Angela Merkel's office said in a statement that the German leader was "relieved" at the arrest, which she described as "a great success in the fight against terrorism."

Prosecutor Harms said in the southwestern city of Karlsruhe that the suspect had come to Germany in September 2004. She identified him only by his first names, Youssef Mohamad.

He had been registered as living in Kiel since February 2005 and studied mechatronics — a combination of mechanics, information technology and electronics.

A student residence in Kiel was searched following Saturday's arrest, prosecutors said.

Officials said they were still seeking the second suspect from the video recording and had not identified him.

Investigators say the bombs, had they gone off, could have resulted in carriages burning out or the trains derailing, causing numerous injuries or deaths.

However, unlike commuter trains attacked in Madrid in 2004 and subway trains bombed in London last year, the trains involved were relatively empty and traveling outside the rush hour.

During the recent fighting in Lebanon, Berlin avoided directly criticizing Israel or calling for an "immediate" cease-fire. However, it tried to draw Syria — a key supporter of Hezbollah — into efforts to defuse the crisis.

Berlin is now considering providing ship patrols, but no combat troops, for an international force in Lebanon.