A man armed with a long knife was arrested in the southeastern French city of Lyon on Thursday as he was about to board a tram, a source close to the inquiry told AFP.
The suspect, an Afghan national in his 20s who was dressed in traditional Afghan clothes, had already been flagged to French intelligence services, the source said.
"He was carrying a 30-centimetre (12-inch) knife and seemed ready to take action," Pierre Oliver, the mayor of Lyon's Second Arrondissement, told AFP.
He is currently being questioned and will probably have a psychological exam, the source said.
The arrest took place near the Perrache train station in the historic heart of the city, not far from where a parcel bomb wounded 14 on a busy pedestrian street in May 2019.
The suspect in the bombing, a 24-year-old Frenchman of Algerian origin, later told investigators he had pledged allegiance "in his heart of hearts" to the Islamic State group.
France was rocked earlier Thursday by the stabbing deaths of three people at a church in the Mediterranean coastal city of Nice, in what investigators are treating as a jihadist terror attack.