Prosecutors accused Ayoub El Khazzani of planning a "targeted and premeditated" attack on a French train last week, which could have led to several deaths had passengers not intervened. The 25-year-old Moroccan, who is believed to have watched a Jihadi video shortly before firing an AK-47 aboard the train from Amsterdam to Paris, was charged with attempted murder of a terrorist nature and remanded in custody.

French Prosecutor Francois Molins said Tuesday that Khazzani was carrying an AKM assault rifle with 270 rounds of ammunition, a Luger M80 automatic pistol with a full cartridge, a box-cutter and a water-bottle-sized container full of gasoline with him, CNN reported.

Khazzani has been charged with membership to a terrorist organization and had reportedly wanted to kill all passengers aboard the train. Molins also added that Khazzani invoked the right to remain silent after providing officials with “evasive answers.”

"According to all of the witness accounts we've gathered ... (El Khazzani) wouldn't have hesitated to use all the arms in his possession -- assault rifle, pistol and box-cutter -- if it wasn't for the remarkable intervention of the passengers," Molins said, according to CNN. He also added that Khazzani was watching a video of "an individual calling his followers to combat and urging them to take up arms in the name of the Prophet" before the attack.

Officials suspect the shooting to be premeditated as Khazzani claimed to be homeless and living in a park in Brussels, but bought a fist-class ticket for the train despite other seats being available, ABC News reported, citing Molins. The authorities are currently trying to find out where the accused got the weapons and how he received the money for a first-class ticket. So far, Khazzani has reportedly said that he found the firearms in a park and said that he just wanted to rob the train and jump out the window.

"We will try and determine where he got these weapons, where he has been in Europe, anybody who has worked with him and his source of financing," Molins said, according to CNN.

Khazzani had assembled the weapon in the toilet between two train cars and is said to have been watching a video supporting jihad shortly before that. Khazzani reportedly stepped out of the toilet shirtless and with the assembled weapon, when a French passenger tried to stop him. Once Khazzani stepped into the compartment, two American servicemen tackled him after his weapon jammed. Another American and a British man helped overpower Khazzani and tie him up.

France has been on high alert since three jihadist gunmen launched an attack in Paris and nearby areas in January, killing 17 people. French President Francois Hollande said Tuesday that: "We are always exposed,” adding: "Friday's aggression on the Thalys Amsterdam-Paris train could have resulted in monstrous carnage without the courage of several passengers.

"This attack is fresh proof that we must prepare for other attacks and therefore protect ourselves."