Such mentality is usually the result of living in violent, crime-prone (typically inner-city) areas for long periods of time and/or watching too much television (no joke).
"Urban survival syndrome" has been used as a legal defense sporadically throughout American history but was first invoked in Texas (go figure) in 1993 by a black youth named Daimion Osby. Osby had been shooting craps with a group of people and had collected a hefty wad of cash ($400). Osby then violated the etiquette rules of street craps by trying to abandon the game without giving the other players a chance to win some of their money back.
Marcus Brooks, who had suffered considerable losses during the game, threatened to "get" Osby as he walked off. With the help of cousin Willie, M. Brooks attempted to shake down Osby during a basketball game, resulting in a fight that was ultimately broken up by police. Osby was again confronted by the duo while in his car sitting at a traffic light; the Brooks brandished a shotgun and tried to force Osby to pull over, but he fled. After a final uneventful confrontation in a public park, Osby purchased a .38 caliber handgun and started carrying it with him for protection.
While conversing with a woman on the curb one evening, Osby was accosted by the Brooks duo for one final time. The Brooks drove their car onto the curb, hitting Osby. They then got out of the car and began assaulting him using their fists. At this point Osby drew his gun and killed one of the Brooks cousins with a single shot to the head. As the surviving cousin attempted to retreat to the car to retrieve the handgun that was stored inside, Osby aerated his assailant's skull with a single shot to the head as well.
At his first trial his attorneys claimed the double homicide was an act of self-defense in the name of urban survival--if he hadn't shot them, they would have returned to threaten, harass or kill him later. Amusingly enough Osby's attorneys tried to convince the jury that anybody having to fight off black men would probably react similarly in fearing for their life; given the statistics, there's a lot of reason to believe black men are scary. But even more amusingly, the defense succeeded (to some degree).
There was no verdict; the jury was hung because one of two black jurors on the panel believed Osby had acted in self-defense. Prosecutors vowed a retrial.
The Fifth Amendment of the Constitution provides for protection against retrials; unless the defendant appeals a guilty verdict, he cannot be tried for the same crime twice (except being tried in both civil and criminal court). However, a hung jury does not prove conclusive--he was neither convicted nor acquitted, so he was fair game for a retrial.
The retrial was held and the "urban survival" plea was not repeated; Osby was found guilty and received an automatic life sentence, as prosecutors had decided before the second trial to not seek the death penalty.