You're only allowed to kill someone to protect e.g. your brother or a friend(not someone you've just said hi to) or when your life is in danger or you're about to be e.g. arrested.
viewtopic.php?f=10&t=16
So it isn't rulebreaking you protected your firend; but if you killed him after your firend died then you rulebreaked.