Once you're in a fight on the ground with a gun involved than anything can happen. The question is why was he fighting with the police in the first place? In the US they will absolutely shoot you for this so the guy may have known and decided to take the gun once the fight started. At the most the police may have tried to detain him and of course when this happens you comply, not fight back.