Self-defence
Can you hit someone to defend yourself without going to prison?
Yes, if the attack is unjustified and currently occurring, and the response was necessary and proportionate. These four conditions met together: the act remains prohibited in theory, but the person bears no criminal responsibility. They are acquitted or released.