we had a case in my agency where an officer was wrestling with an armed robber. they both had their hands on her gun and they were literally fighting for her life over possession of same (statistically speaking, when a criminal disarms an officer, they will use that weapon against the officer 80% of the time. if somebody attempts to disarm me, that's a deadly force situation. if I have my gun out and trained on them and they charge me, that's why it's a valid shoot. I can articulate they are evidencing intent to disarm me and even though I don't know that they are armed, that action doesn't mean I have to DEESCALATE and holster and go hands on, recognizing that most of the time, there isn't enough time to do that safely anyway). armed store owner (the store that had just been robbed) ran up and center punched the perp in the head with his gun. One shot, and the suspect was dead.
Needles to say he was neither criminally charged, nor sued. In fact, he got a medal from our PD. Of course family members of the robber had the usual quotes in the paper about how he was 'turning his life around' 'didn't deserve to die' etc.
the two distinctions when a person comes to the aid of an officer in a deadly force situation are
1) the officer REQUESTS TO BE AIDED.E.G he yells "help me" etc. Those scenarios are EXTRA golden for the person coming to the aid. In some states, it is actually a situation where the person is technically 'deputized' by such a request and will enjoy much of the same immunity from liability that a cop would have with QI. Either way, an explicit request for help is obviously the BEST situation. The chief of my former PD once came to the aid (nondeadly force situation) of a NYPD cop wrestling with a person he was trying to arrest. he was not a police officer at the time, just a college student. hes also 6'8 and strong as hell. He grabbed one of the suspect's arms and promptly broke it in trying to get it in position to handcuff. NO problemo. No civil or criminal stuff whatsoever. GENERALLY speaking, a civilian has GREATER latitude in using force in many respects than a cop, since they don't have traijning, backup etc. In WA state, the RCW explicitly recognizes that the standard needed to use deadly force is LESS strict for a civilian than for a cop. It's a double standard that favors the civilian when using deadly force
2) the officer does not verbally request. Probably best, IF PRACTICAL to ask the officer "do you need help?" although not necessary. either way, as long as the person acts REASONABLY - iow a reasonable person presented with the facts and circs known/observed by the actor would feel justified in using deadly force, he again will likely be golden
Defense of others is treated MUCH like defense of self. Some states are MUCH better at protecting those making self (and other) defense claims than others. WA state is particularly excellent. Ymmv
So, in summary, if in this incident, there was reasonable cause on the part of the shooter to believe the officer was in danger of imminent serious bodily harm or death he will be totally justified in the shoot. He would have little to worry about civilly or criminally.