U.S. President Barack Obama has praised the passengers who stopped a gunman on a high-speed train traveling from Amsterdam to Paris on Friday from injuring other passengers further.

"The president expressed his profound gratitude for the courage and quick thinking of several passengers, including US service members, who selflessly subdued the attacker," the White House said in a statement.

Two of the three passengers who stopped the attacker were Spencer Stone and Alek Skarlatos, who are members of the Air Force and the National Guard, respectively, and were traveling with their friend.

The passenger who helped subdue the gunman was Chris Norman, a British man who was living in France. The three were awarded with medals for bravery by authorities in Arras, BBC News reported.

A gunman opened fire on Friday and injured two people on a fast-moving train in France and was subdued by the three aforementioned male passengers.

The attacker was arrested after the train stopped at the Arras station in Northern France.

Bernard Cazeneuve, the French Interior Minister, said that officials do not know what the gunman's motives were and that the French anti-terrorism prosecutor is investigating the incident, according to Reuters.

Cazenueve also revealed that one of the American passengers is currently confined due to serious injuries.

The gunman arrested was a 26-year-old Moroccan, said Sliman Hamzi, an official with the Alliance police union.

Although the gunman did not fire his automatic weapon, he did injure one man with the use of a handgun and another person with a kind of blade, said Philippe Lorthiois, an official with the Alliance police union, according to the Associated Press.