Italian anti-terrorism officials are investigating a 23-year-old man suspected of stabbing an army corporal outside Milan's main train station, Italian media reported on Tuesday.

The suspect attacked the patrolling soldier from the back with a letter opener, causing the victim to suffer light injuries to the neck. Other troopers then apprehended and disarmed the man before handing him over to the police.

"The subject was promptly immobilized by the soldiers thanks to the techniques acquired during military combat training," the Italian army said in a statement.

The alleged attacker had already been stopped in the same area late on Monday for trying to stab people with a pen, according to a report from Italian ANSA news agency carried by Germany's DPA.

ANSA described the man as an irregular migrant from Yemen. Witnesses said he had shouted "Allahu Akbar" (God is greatest) during his arrest.

He was charged with causing injuries to a public official.

Italian daily Corriere della Serra reported that the soldier's condition was not serious. He received medical aid at the scene before being transported to hospital.

Milan's central railway station also saw a similar attack in 2017, when a dual Italian-Tunisian national injured two members of the military and a railway police officer in a stabbing rampage.

Every evening, DW sends out a selection of the day's news and features. Sign up here.