France's Interior Minister Bernard Cazeneuve.
A gunman overpowered by passengers on a train in France on Friday was known to European authorities as a suspected Islamist militant, provided the identity he has given interrogators is correct, France's interior minister said.
Two people were wounded in the struggle to subdue the Kalashnikov-toting attacker aboard the high-speed train from Amsterdam to Paris. Two U.S. servicemen, one of whom suffered knife wounds, were among passengers who stopped the gunman.
"It is important to be careful about his identity which is not yet established with certainty," Cazeneuve said.
"If the identity he has declared is confirmed, he is a 26-year-old man of Moroccan nationality identified by the Spanish authorities to French intelligence services in February 2014 because of his connections to the radical Islamist movement."
He said inquiries in collaboration with other European authorities "should establish precisely the activities and travels of this terrorist".
Spain's interior ministry could not immediately be reached for comment.
A source with knowledge of the case, speaking on condition of anonymity, said the gunman had originally given a different identity which was unknown to the security services.
Cazeneuve said the attacker had a Kalashnikov assault rifle, an automatic pistol with accompanying ammunition clips and a box cutter knife. He said the struggle started when a Frenchman on his way to the toilet tried to stop the man entering a carriage.
The minister said the second person hurt was of Franco-American nationality, hit by a bullet while seated. Authorities said last night a French actor had also been hurt.
French authorities have been on high security alert since January, when 17 people were killed in shootings by Islamist militants in and around Paris.
The man the attacker claims to be lived in Spain during 2014 and in Belgium in 2015, Cazeneuve said.
According to Le Voix du Nord, citing security sources, the suspected Islamist militant was seen on a plane to Turkey from Germany in May, and was thought to have visited Syria.
The French newspaper said he may have had connections to a group involved in a suspected Islamist shooting in Belgium in January.
President Barack Obama expressed his gratitude on Friday for the "courage and quick thinking" of the passengers, echoing similar words from Cazeneuve at a separate news conference late on Friday.
"It is clear that their heroic actions may have prevented a far worse tragedy," Obama said in a statement.
The wounded U.S. serviceman, named only as Spencer, was expected to be treated at a specialist hospital for people with hand injuries in the northern French city of Lille.
President Francois Hollande's office said he would receive the passengers who subdued the gunman to thank them in the coming days.
The gunman has been transferred to the Paris region from Arras in northern France where the incident took place.
Cazeneuve said under the terms of his arrest the man can be held for four days without being charged.
The shooting took place on a Thalys high-speed train. Thalys is partly owned by French state transport group SNCF and by Belgian railways. It runs international trains joining France, Belgium, the Netherlands and Germany.
All four countries are part of the Schengen area through which people travel without the need for passports and security check-ins. Experts have long said the trains are a potential target for attacks.