A German police officer was critically wounded and two passers-by hurt on Tuesday when a lone gunman fired shots at a commuter rail station near the German city of Munich before being injured himself and detained, police said.
A Munich police spokesman told reporters there was no indication of a "political or religious" motive behind the morning rush hour incident.
"The sole male perpetrator was motivated by personal reasons," said spokesman Marcus da Gloria Martins.
Police identified the gunman as a 37-year-old German national, whose criminal record showed only one charge for possession of a small quantity of marijuana in 2014.
Martins said the man had tried to push at least one police officer in front of an incoming train at an S-Bahn station in Unterfoehring, a northeastern suburb of the Bavarian city.
A scuffle ensued during which the assailant snatched an officer's gun and fired.
"The police officer was shot in the head and critically injured," Martins said. She is 26 years old.
Two other people at the station, one German and one Romanian, were seriously wounded and are being treated in local hospitals but their lives were not believed to be in danger.
"The assailant was arrested. He was also injured. There are no indications of further perpetrators," police tweeted.
The officers had been called to the scene when a fight broke out among several people on a train, witnesses said.
The train was stopped at the Unterfoehring station and the brawlers were hauled out by police, leading to the escalation.
The station is on a busy line leading to and from Munich's main international airport. Travellers were diverted to another rail line after the shooting.
The perpetrator was not shot but rather injured in the scuffle, in which neither of the two victims were involved, police said.
Authorities on high alert
Last July, 18-year-old David Ali Sonboly shot dead nine people at a Munich shopping mall before turning the gun on himself, having spent a year planning the rampage.
Police said the German-Iranian teen was "obsessed" with mass murderers such Norwegian right-wing fanatic Anders Behring Breivik and had no links to the Islamic State (IS) group.
In March, an axe-wielding attacker wounded nine people in a bloody rampage at a railway station in the western city of Duesseldorf.
The 36-year-old Kosovan had been diagnosed as a paranoid schizophrenic with a history of high anxiety and self-harm, police said, ruling out a terrorist motive.
Instead, they suggested he might have carried out the attack at the station to end his own life.
The suspect was taken into custody after jumping off a bridge.
And in May 2016, a psychologically disturbed man killed one person and wounded three in an apparently random knife attack at Grafing railway station east of Munich.
The suspect reportedly yelled "Allahu akbar" but police found no evidence of a political or religious motive.
German authorities have been on high alert since a series of attacks claimed by IS.
The deadliest was in December when a Tunisian rejected asylum seeker rammed a truck into a crowded Berlin Christmas market in an attack that killed 12 people and wounded dozens of others.