A castle doctrine, also known as a castle law or a defense of habitation law, is a legal doctrine that designates a person's abode or any legally occupied place (for example, a vehicle or home) as a place in which that person has protections and immunities permitting one, in certain circumstances, to use force (up to and including deadly force) to defend oneself against an intruder, free from legal prosecution for the consequences of the force used. The term is most commonly used in the United States, though many other countries (see below) invoke comparable principles in their laws.
Depending on the location, a person may have a duty to retreat to avoid violence if one can reasonably do so. Castle doctrines lessen the duty to retreat when an individual is assaulted within one's own home. Deadly force may either be justified, the burdens of production and proof for charges impeded, or an affirmative defense against criminal homicide applicable, in cases "when the actor reasonably fears imminent peril of death or serious bodily harm to him or herself or another". The castle doctrine is not a defined law that can be invoked, but a set of principles which may be incorporated in some form in many jurisdictions. Castle doctrines may not provide civil immunity, such as from wrongful death suits, which have a much lower burden of proof.
Justifiable homicide in self-defense which happens to occur inside one's home is distinct, as a matter of law, from castle doctrine because the mere occurrence of trespassing—and occasionally a subjective requirement of fear—is sufficient to invoke the castle doctrine, the burden of proof of fact is much less challenging than that of justifying a homicide in self-defense. With justifiable homicide in self-defense, one generally must objectively prove to a trier of fact, against all reasonable doubt, the intent in the intruder's mind to commit violence or a felony. It would be a misconception of law to infer that because a state has a justifiable homicide in self-defense provision pertaining to one's domicile, it has a castle doctrine protecting the estate and exonerating any duty whatsoever to retreat therefrom. The doctrine can be misused as a pretext for extrajudicial punishment in private spaces. The use of this legal principle in the United States has been controversial in relation to a number of cases in which it has been invoked, including the deaths of Japanese exchange student Yoshihiro Hattori and Scottish businessman Andrew de Vries.