MUNICH (Reuters) - A German man suffering from psychiatric problems stabbed four people at a train station near Munich early on Tuesday, killing one man and wounding three more in an attack investigators said did not appear to be politically motivated.

Witnesses said the alleged assailant, a 27-year-old unemployed carpenter, attacked his first victim shouting “Allahu Akbar” (‘God is Greatest’ in Arabic). Some witnesses said they also heard him shout “infidels must die”.

The man received psychiatric treatment just two days ago and has confessed to using drugs, investigators said. He was arrested at the scene and was being questioned.

“From what we know so far, he was a lone criminal ... There is no indication that he was part of an Islamist network,” Petra Sandles, vice president of Bavaria’s office of criminal investigations, told reporters.

Investigators said it was unclear why the man, who had spent the night at the railway station, had chosen Grafen, a quiet commuter town about 32 km (20 miles) southeast of the Bavarian capital Munich for the indiscriminate attack.

“So far there are no findings that are relevant for state security,” Bavarian Interior Minister Joachim Herrmann said.

Police said the man was wielding a knife with a 10 cm (4 inch) long blade in the attack at about 5 a.m. (0300 GMT).

One victim, a 50-year-old, died of stab wounds in hospital shortly afterwards. Police said one other man was seriously injured and two others who had been riding bicycles had less serious stab wounds.

State prosecutor spokesman Ken Heidenreich told reporters the suspect, who comes from near the western city of Giessen, had given very confusing statements and he might be referred to a psychiatric institution.

“After questioning, nothing really fits together,” he said.

Investigators said the suspect may have converted to Islam but there was no indication that he had been radicalized.

Germany, which is playing a supporting role in the fight against Islamic State, has not suffered a major attack by Islamist militants on the scale of those that have hit neighboring France and Belgium.

But with about 260 of the more than 800 home-grown radicals who have joined jihadist groups in Syria and Iraq having since returned to Germany, ministers have warned an attack is possible and security services are on alert.

Slideshow ( 12 images )

Some Germans fear militants may also have taken advantage of Europe’s migrant crisis to enter the country. Over the past year Germany has taken in more than one million, mostly Muslim migrants and refugees fleeing wars in Syria and elsewhere.