I think you'd be alright in that case. You'd have eye witnesses and a camera to back up your story. The dude isn't fleeing he is holding people up, and you had an opportunity to save lives by shooting him from behind. No way you go to prison for that.
The person shooting the bad guy in the back must be certain the guy was a danger to someone at the time. If he's fleeing, he's not. It's a snap judgment, but a very critical one.
This point is relevant to me because in my church, I'll be the member of the security team in the choir loft at the rear of the sanctuary. If a guy comes in a starts shooting, chances are he'll be standing in the center aisle, almost directly below me, looking toward the front of the sanctuary. If he's shooting, or waving a gun around threatening to shoot, it would be justifiable for me to get him in the back, if I am to save others' lives. I just have to get those sopranos out of my way first!