Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

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 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, Sophie David, told the French TV news channel BFMTV.

David said the 26-year-old Moroccan expressed surprise when he was told that European authorities suspected him of being an Islamist militant.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"He is dumbfounded by the terrorist motives attributed to his action," said David, who described the man as her client. She said he was barefoot and wearing only a white hospital shirt and boxer shorts for the interview at a police station in Arras, northern France, where the train stopped after the incident.

Related: 'Do Something or Die': American Train Heroes Acted on Guts

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 traveling from Amsterdam to Paris and he hoped to feed himself by armed robbery," David said.

Ayoub El Khazzani, right, the suspect in an attack on a train in France. Facebook

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.

Despite the robbery claim, Khazzani had an AK-47 with several magazines of ammunition, a handgun and a knife.

Anthony Sadler, one of the hero Americans, said at a news conference in Paris later Sunday, "It doesn't take eight magazines to rob a train."

French Interior Minister Bernard Cazeneuve did not name Khazzani, but he 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."