BERLIN — A police officer was shot in the head at a Munich subway station Tuesday after a man grabbed a colleague’s service pistol and opened fire, also wounding two bystanders, German authorities said.

The officer’s injuries were considered life-threatening, Munich police spokesman Marcus da Gloria Martins said.

The suspect, identified only as a 37-year-old German man born in Bavaria, was apprehended at the Unterfoehring station after being wounded in an exchange of fire with police, da Gloria Martins said.

Authorities were called to the station at 8:20 a.m. (0620 GMT) to deal with a fist fight aboard a subway train that ran from the airport into the city, Munich police said.

The first two officers on the scene confronted one of the men on the platform and everything was going “completely without problems” until the suspect suddenly shoved one of the officers with “massive force,” Munich police chief Hubertus Andrae told reporters.

A struggle ensued and the suspect was able to grab the service pistol of one officer. The suspect opened fire, emptying the weapon and shooting the female officer in the head, Andrae said.

“They were carrying out a routine operation, the kind that we do hundreds of times a year, and it suddenly turned into a brutal act of violence,” Andrae said.

The 26-year-old officer is believed to have fired her own pistol before she was hit, apparently hitting the suspect in the buttocks. “Who shot first is part of the investigation,” Andrae said. The female officer was being treated in hospital for serious injuries.

After the pistol was empty, the suspect dropped it and fled the scene. He was apprehended by police nearby.

Police were questioning about 200 witnesses to the incident to try and piece together exactly what happened, Andrae said.

It was also not clear whose shots hit the bystanders, but police believe it to have been those fired by the suspect, Andrae said. Both men were treated in hospital for their wounds, but they weren’t considered life-threatening.

Authorities don’t believe the incident had to do with terrorism, saying that the suspect appeared to have acted out of “personal” reasons and not with political or religious motivations, da Gloria Martins said.

The suspect was arrested in 2014 for cannabis possession, but the case against him was dropped because the amount was so small, authorities said. At the time he told police he was an electrician by profession.