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.
Marcus Brooks, one of the players who had suffered considerable losses during the game, threatened to "get" Osby as he walked off. With the help of cousin Willie, Marcus 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 curbside one evening, Osby was again accosted by the Brooks duo. 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 retreated to his car to retrieve his own handgun, Osby aerated the surviving assailant's skull with another perfect shot to the head.
At Osby's 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 two black guys 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 of murder and received an automatic life sentence, as prosecutors had decided before the second trial to not seek the death penalty.