A judge has refused to grant immunity to a white Alabama police officer who said he was acting in self-defense when he fatally shot an unarmed black man in 2016.

WSFA reports that Montgomery Judge Greg Griffin made the decision after a Thursday hearing in which Montgomery police officer Aaron Cody Smith described the shooting. Smith will go on trial next month on murder charges for the death of 58-year-old Greg Gunn.

The shooting happened after Smith stopped Gunn as Gunn was walking through his neighborhood.

Smith testified he was "absolutely" in fear of his life. He said Gunn ran from him and he first tried a stun gun and baton. He said he pulled his weapon because he thought Gunn was arming himself with a painter's pole from a porch.