An armed man has injured three people on a train between Amsterdam and Paris before being overpowered by passengers, including two off-duty US soldiers.
The incident happened on the high-speed Thalys service near Arras, and the attacker was arrested at Arras station.
United Kingdom's interior minister praised the Americans, reported to be off-duty soldiers.
One of them was seriously injured, as was another passenger.
The man arrested was a 26-year-old Moroccan. Anti-terrorist officers have taken over the case.
The weapons were said to include a Kalashnikov, a knife, an automatic pistol and cartridges.
One of the two people seriously hurt had a gunshot wound, the other a knife wound.
French media said the arrested man was known to the intelligence services. The suspect has so far refused to talk to police in Arras.
Belgian Prime Minister Charles Michel said the incident was a "terrorist attack".
French Interior Minister Bernard Cazeneuve travelled to Arras in the wake of the attack.
He said: "As always where an act that could be terrorist in nature is involved, the greatest care and the greatest precision will be used."
He praised the Americans who overpowered the suspect.
Mr Cazeneuve said they were "particularly courageous and showed great bravery in very difficult circumstances," adding: "Without their composure we could have been confronted with a terrible incident."
French media said the passengers who overpowered the suspect were US Marines who had heard the man loading a weapon in a toilet cubicle and confronted him when he came out.
Mr Cazeneuve said the attack had taken place at 5.45pm local time.
Mr Cazeneuve said he had also met French actor Jean-Hugues Anglade, who was lightly wounded when breaking glass to sound the alarm, and other passengers.
"My thoughts are with the wounded and with the passengers who are in a state of shock," Mr Cazeneuve said.
Initial reports suggested the second person seriously hurt was a Briton, but the UK Foreign Office later said there were no reports that British nationals were hurt.
Images shared on social media appeared to show a man being restrained on the station platform in Arras.
One photograph showed an injured man in a blue top and jeans lying on the floor of the train.
French rail firm SNCF said there had been 554 people on board the train.
"The situation is under control, the travellers are safe. The train stopped and the emergency services are on site," the Thalys official Twitter account tweeted.
Thalys said several trains had been delayed in the wake of the attack.
France has been on edge since the attack on the Charlie Hebdo magazine and a Jewish supermarket in Paris in January, which left 17 people dead.
And in June a man said to be inspired by the Islamic State group beheaded his boss and tried to blow up a gas plant in southern France.
-BBC