An actor who was rehearsing in the toilet of a French train was quizzed by police as a possible terrorist threat after a guard overheard the words “weapon” and “gun”, transport authorities said.

The 35-year-old had shut himself away to practise his lines for an English-language stage role. But a passing train guard who overheard his soliloquy raised the alarm, telling his bosses there was someone talking about weaponry in the WC.

The high-speed train, en route to Paris from Marseille, made an unscheduled stop in the city of Valence where security forces took the man for questioning at a police station. He was later released without charge.

France is still under a state of emergency imposed after the November 2015 attacks in Paris, when jihadists killed 130 people in a night of carnage at venues across the city.

On Tuesday police shot and injured a man who attacked an officer outside Paris's Notre Dame cathedral. “Taking into account the current context of terrorism and the national threat level, the train guard did not take any risks and for the avoidance of doubt had the man questioned,” a spokesman for national train company SNCF told AFP.