Killing is the ending of life in a animal. Homicide is the killing of a member of your own species. Murder is the homicide of a member of your community. The only circumstances in which Murder is justifiable is if the target poses a clear and present danger to the life or safety of you or other members of your community, and there is no reliable alternative to thwart the target's actions.
It's important to clarify the last bit first. If it is possible to reliably thwart the actions of another who means harm to you or another member of your community you should use that alternative. A disable, involving the law or lesser authorities whatever is possible to resolve the situation non-lethally. So long as it will reliably work.
Unfortunately, most situations in which a person's actions present a clear and present danger cannot be reliably thwarted in a non-lethal, non-violent manner. Ether the danger of forcing a violent outcome accidentally is too great or there is no time to alert the authorities (or the response time of the authorities is too great). It is important to analyze a situation correctly, and then make the correct decision; "Can I resolve this situation without killing someone?" If the answer is yes, you should do so. If the answer is no then you should act quickly and without hesitation, or remorse.
A clear and present danger to life is one in which; by the perpetrator's direct action harm would come to another. The danger must be obvious and definite (i.e. a weapon, explosive device or lethal toxin) and the danger must pose an immediate danger to yourself or others. The weapon must be drawn, the explosive must be in dangerous proximity to people, the poison must be either in distribution (i.e. the Jonestown cool-aid) or in proximity to a target (i.e. a pellet of ricin).
A clear and present danger to safety is a little more amorphous and is primarily centered around non-lethal harm being inflicted on a target against their will, or without their consent. Easy examples include assault, child molestation and kidnapping. Distribution of illegal drugs is not, because drug users ask for the dangerous substances, rather than having them inflicted upon them.
Finally, murder requires that the target (that'd be the one getting killed) be a member of your community. A community is a social group that agrees to abide by the same framework of laws and rules. Tourists are required to abide by the rules for the duration of their stay; temporary members of the community. Legal aliens (both resident and non-resident) are likewise required to obey the laws of our community while they are here; also temporary members of the community. Illegal aliens have not agreed to abide by the rules of the community (indeed they are flouting the laws of their invaded communities just by being there); not members of the community.
If either the killer or the target of a murder is not a member of the community, then the act is not murder, but merely homicide. And while possibly distasteful, homicide is not (for lack of a better word) sinful. Just remember that you too are not a member of everyone's community.