A German policewoman was shot in the head when a man grabbed a police gun at a suburban station in Munich.
The woman, 26, was critically wounded and two bystanders also seriously hurt in the shooting at Unterföhring S-Bahn station, police said.
Police shot and lightly wounded the gunman, who is now in custody. Police said it was not a terrorist incident.
A major police operation is under way in the northern suburb of Unterföhring, and rail services have been suspended.
Police said there was no further danger to the public.
The two wounded bystanders are being treated in hospital, while the policewoman is fighting for her life.
Police said the shooting happened when police intervened in a scuffle between several people at the station, one of whom had a knife.
The man fired at least five shots. He was lightly injured when police fired back, and is now being questioned.
German n-tv news says he is a 37-year-old German citizen and a Munich resident
The S-Bahn line passing through Unterföhring is one of the main routes to Munich airport.
In May 2016 a man killed a commuter and injured three others in a knife attack at Grafing railway station near Munich. The man had run amok and was later found to be mentally ill.