Several people were wounded when shots were fired at a commuter rail station near the southern German city of Munich on Tuesday and one person was detained, police said.
"Several people were injured by shots. A female police officer was badly wounded" at an S-Bahn station in Unterfoehring, a northeastern suburb of the Bavarian city, police tweeted, and that the scene was now "secured".
A Munich police spokesman, Marcus da Gloria Martins, later told reporters there was no indication of a "political or religious" motive behind the incident.
"The sole male perpetrator was motivated by personal reasons," he said.
Martins said that the unidentified man had tried to push at least one police officer in front of an incoming train, leading to a scuffle during which he took the female officer's gun and fired.
"The police officer was shot in the head and critically injured," Martins said.
Two other people at the station were seriously injured but their lives were not believed to be in danger. They were being treated in local hospitals.
"The assailant was arrested. He was also injured. There are no indications of further perpetrators," according to another police tweet.
"The area around the suburban train station Unterfoering has been cordoned off."
Last July, an 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.
And 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 national 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.
German authorities have been on high alert since a series of attacks claimed by IS.
The most deadly came last 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.