Media captionThere was a heavy police presence at Unterföhring S-Bahn station in Munich

A 26-year-old policewoman is fighting for her life after being shot in the head when a man grabbed a police gun at a suburban station in Munich.

She shot back, wounding the gunman lightly. He is now in custody. Police said it was not a terrorist incident.

Two bystanders were seriously hurt; one shot in the arm and one in the leg.

A police team responded to reports of a brawl on a busy train and the man tried to push a policeman in front of an approaching train.

In the ensuing struggle, he managed to get hold of a police gun and fired at least five shots, wounding the female officer and two bystanders.

Despite her severe injuries, she managed to shoot him back.

He fled the scene but was captured shortly afterwards. Police said one of the things they would attempt to find out through questioning was how he managed to bypass the security features on the gun.

It happened at Unterföhring S-Bahn station in the north of the city. The two bystanders are being treated in hospital for injuries that are not life-threatening.

Police said the attacker was a 37-year-old German man, born in Bavaria, with no registered address. The state prosecutor said his previous criminal record consisted only of possession of a small amount of cannabis, but that he would now be charged with attempted murder.