Environmental and genetic factors can modulate aggressiveness, but the biological mechanisms underlying their influence are largely unknown. Social experience with conspecifics suppresses aggressiveness in both vertebrate and invertebrate species, including Drosophila. We searched for genes whose expression levels correlate with the influence of social experience on aggressiveness in Drosophila by performing microarray analysis of head tissue from socially isolated (aggressive) vs. socially experienced (nonaggressive) male flies. Among approximately 200 differentially expressed genes, only one was also present in a gene set previously identified by profiling Drosophila strains subjected to genetic selection for differences in aggressiveness [Dierick HA, Greenspan RJ (2006) Nat Genet 38:1023-1031]. This gene, Cyp6a20, encodes a cytochrome P450. Social experience increased Cyp6a20 expression and decreased aggressiveness in a reversible manner. In Cyp6a20 mutants, aggressiveness was increased in group-housed but not socially isolated flies. These data identify a common genetic target for environmental and heritable influences on aggressiveness. Cyp6a20 is expressed in a subset of nonneuronal support cells associated with pheromone-sensing olfactory sensilla, suggesting that social experience may influence aggressiveness by regulating pheromone sensitivity.