A heavily-armed man opened fire in a "terrorist attack" on a high-speed train travelling from Amsterdam to Paris on Friday, injuring at least two people before being overpowered by two American passengers.
The motives for the shooting were not immediately known, although French prosecutors said a probe was being launched by counter-terrorism investigators.
The suspect, who was arrested at a railway station in northern France, was identified as a 26-year-old from Morocco or of Moroccan origin who was known to the intelligence services, French investigators said.
France has been on edge since Islamist gunmen went on the rampage in January, killing 17 people in the capital Paris.
"I condemn the terrorist attack on the Thalys (train) and express my sympathy to the victims," Belgian Prime Minister Charles Michel said on Twitter of the incident which occurred while the train was on Belgian territory.
According to the initial information from investigators, the two men who tackled the gunman were American soldiers who had apparently heard him loading his weapons in the train's toilet and confronted him when he left the cubicle.
He was then arrested after the TGV train pulled into the station in the French town of Arras with 554 passengers on board, a spokesman for the French state rail company SNCF told AFP.
The gunman was carrying several weapons in his luggage, including a Kalashnikov, an automatic pistol, and razor blades, one police source told AFP.
One victim was hit by a bullet but his life was not in danger, while the second suffered cuts to his elbow caused by a box cutter.
An American -- possibly one of the men who tackled the attacker -- and a Briton were reportedly injured although there was no official confirmation of the nationality of the victims.
The French actor Jean-Hugues Anglade, who appeared in the 1986 cult film "Betty Blue" staring Beatrice Dalle, was lightly injured in the incident, a witness told AFP on condition of anonymity.
He had reportedly been hurt breaking the glass to activate the train's alarm.
"There were two people with blood on them, one had a wound to the eye. The second was around 30 and had a bandage on his shoulder. Both men were on stretchers," witness Nicolas Martinage, 17, told AFP at Arras station.
French President Francois Hollande and Belgian premier Michel agreed in a telephone call to "cooperate closely" in the investigation, according to a statement from the Elysee.
"Everything is being done to shed light" on the shooting, Hollande said.
French Interior Minister Bernard Cazeneuve went to Arras in the wake of the incident, which occurred shortly after 6.00 pm (1600 GMT).
Cazeneuve's spokesman Pierre-Henry Brandet said, adding: "It is too early to speak of a terrorist link."
But the French prosecutor's office said that its anti-terrorist section has taken over the case, "in view of the weaponry used, the way it happened and the context".
Between 150 and 200 passengers and their luggage were left waiting at Arras station, some of them from the Thalys train, along with a large number of police and rescue workers, an AFP journalist said.
"The passengers are safe, the situation has been brought under control,"
train operator Thalys, which is jointly owned by the national rail companies of Belgium, France and Germany, said on Twitter
One passenger, Patrick Arres, 51, said that when the train pulled into Arras station he saw more than 30 armed police on the tracks. "They were looking for someone, people were scared."
France remains on edge after Islamic extremists attacked the satirical magazine Charlie Hebdo and a Jewish supermarket in Paris in January in a spree that killed 17 people and shocked the world.
In June, a man beheaded his boss and tried to blow up a gas plant in southern France in what prosecutors say was an attack inspired by the Islamic State group.
In May last year, four people, including two Israeli tourists, were killed when a gunman opened fire at the Jewish Museum in Brussels. (AFP)