PARIS - The gunman who was disarmed by passengers on a train in France two days ago looked weak and malnourished and said he had only meant to rob people, a lawyer who interviewed him after the attack said on Sunday.

"(I saw) somebody who was very sick, somebody very weakened physically, as if he suffered from malnutrition, very, very thin and very haggard," the lawyer said.

David said the 26 year-old Moroccan expressed surprise when he was told that European authorities suspected him of being a militant. "He is dumbfounded by the terrorist motives attributed to his action," said David. She said he was barefoot and wearing only a white hospital shirt and a boxer shorts for the interview at a police station in Arras, northern France, where the train stopped after the incident.

The man, named by French and Spanish sources close to the case as Ayoub el Khazzani, told David he found the Kalashnikov he was carrying in a park near the Gare du Midi rail station in Brussels where he was in the habit of sleeping.

"A few days later he decided to get on a train that some other homeless people told him would be full of wealthy people travelling from Amsterdam to Paris and he hoped to feed himself by armed robbery," David said.

Two people were wounded in the struggle to subdue Khazzani aboard the high-speed train from Amsterdam to Paris on Friday. Three young Americans, one of whom suffered knife wounds, were among the passengers who stopped the gunman.

French Interior Minister Bernard Cazeneuve did not name Khazzani, but said the man in custody had been "identified by the Spanish authorities to French intelligence services in February 2014 because of his connections to the radical Islamist movement".