An Eritrean man goes on trial in Germany on Wednesday for fatally throwing a boy under a train during an episode of paranoid schizophrenia, in a case that stoked a heated immigration debate.

The man, identified by police as Habte Araya, 41, is accused of pushing the eight-year-old boy and his mother onto the tracks in an apparently random attack at Frankfurt's main station last July.

The mother was able to roll off the tracks to avoid the oncoming InterCity Express (ICE) train but the boy was killed instantly.

The suspect, who had entered Germany from Switzerland days earlier, also tried to push a 78-year-old woman onto the tracks but she managed to save herself.

The tragic case quickly filled the front pages of newspapers in Germany and led to an outpouring of sympathy, with 100,000 euros ($120,000) raised for the boy's family in just a few days.

It also led the far-right AfD party to call for tighter controls on foreigners entering Germany, although the man was not in the country illegally.

Following a psychiatric assessment, prosecutors said Araya was suffering from paranoid schizophrenia and had "at least a considerably reduced ability" to control his actions.

They say he committed manslaughter, attempted manslaughter and dangerous bodily injury and have applied for him to be placed in a secure psychiatric institution.

He could also be found to have committed murder and attempted murder if he is deemed to have acted with malice and "deliberately exploited the victims' defencelessness".

- Father of three -

Araya did not previously know the victims and showed no signs of alcohol or drug use at the time of the attack, prosecutors said.

A married father of three, he had been living in Switzerland and was on the run from Swiss police after a violent incident the previous week.

He had recently undergone psychiatric treatment, according to police in the Swiss canton of Zurich where he lived.

The week before the incident in Frankfurt, he had threatened a neighbour with a knife and locked her up, and also trapped his wife and their children, aged one, three and four, in their flat before running away.

Police said it appeared the suspect had not been listed as wanted in European police databases and had been able to cross borders freely.

- Tougher border controls -

The case shocked Germany and led politicians to call for heightened security including more camera surveillance at train stations and tighter border checks.

Conservative Interior Minister Horst Seehofer also saw the case as an occasion to take a tougher line on immigration, suggesting more extensive screening and "occasional temporary checks" at borders.

A government spokesman said last week that plans for increased security in stations were still under review, but had been slowed down due to coronavirus restrictions.

In a similar case just one month before the Frankfurt incident, a 34-year-old mother died after being pushed in front of a train, allegedly by a Serbian man.

Germany's far right highlighted both killings to once more criticise what it regards as the flawed immigration policies of Chancellor Angela Merkel's government.

"Protect the citizens of our country at long last," the anti-migration AfD party's parliamentary group leader Alice Weidel tweeted.

Araya had been living in Switzerland since 2006 and was granted asylum in 2008.

According to the Bild newspaper, he had worked for a local transport company and was described by authorities as "an example of successful integration".

He was even featured in a campaign by Swiss authorities to promote successful integration.