A gunman was shot dead Wednesday after opening fire at two separate police stations in Australia, injuring at least two cops, according to reports.

Video widely circulated on Australian media appeared to show the attacker dressed all in black and brandishing a shotgun as he walked toward Penrith police station before a deadly gun battle.

“He’s shooting the f–king police!” a woman cries in the video, seemingly taken from an apartment across the road from the station in a suburb west of Sydney.

“I’m not joking, look, I’m telling you this is happening … in front of my eyes,” another woman, clearly distressed, adds — gasping as gunshots ring out, “Oh my God! Oh my God!”

At least 20 gunshots can be heard and uniformed officers with their weapons drawn can be seen approaching the suspect on the ground.

Two police officers were taken to the hospital with non-life-threatening injuries, according to the Sydney Morning Herald.

The suspect is thought to have also shot at neighboring St. Marys police station, about a 15-minute drive away, the paper said.

Police are not treating it as a terror-related incident, sources told the paper.