Killing someone who was trying to kill you should be considered self-defense by the justice system, or at least an extenuating circumstance, and it should allow you to kill the attacker without receiving a wanted level, or by receiving a shorter sentence / lower bail.