When faced with a threat, an animal must decide whether to freeze, reducing its chances of being noticed, or to flee to the safety of a refuge. Animals from fish to primates choose between these two alternatives when confronted by an attacking predator, a choice that largely depends on the context in which the threat occurs. Recent work has made strides identifying the pre-motor circuits, and their inputs, which control freezing behavior in rodents, but how contextual information is integrated to guide this choice is still far from understood. We recently found that fruit flies in response to visual looming stimuli, simulating a large object on collision course, make rapid freeze/flee choices that depend on the social and spatial environment, and the fly’s internal state. Further, identification of looming detector neurons was recently reported and we identified the descending command neurons, DNp09, responsible for freezing in the fly. Knowing the sensory input and descending output for looming-evoked freezing, two environmental factors that modulate its expression, and using a genetically tractable system affording the use of large sample sizes, places us in an unique position to understand how a information about a threat is integrated with cues from the environment to guide the choice of whether to freeze (our goal). We focus on how social and spatial information impinges on survival circuits that gate defensive responses. Finally, we aim to understand how freezing, once selected, is instantiated, from its neuronal control to the somatic changes that accompany this behaviour. This project will provide a comprehensive understanding of the mechanism of freezing, a pervasive defensive response, and its modulation by the environment, from muscles, through neuronal circuits, to collective behaviour.