Electrical stimulation of certain hypothalamic regions in cats and rodents can elicit attack behaviour, but the exact location of relevant cells within these regions, their requirement for naturally occurring aggression and their relationship to mating circuits have not been clear. Genetic methods for neural circuit manipulation in mice provide a potentially powerful approach to this problem, but brain-stimulation-evoked aggression has never been demonstrated in this species. Here we show that optogenetic, but not electrical, stimulation of neurons in the ventromedial hypothalamus, ventrolateral subdivision (VMHvl) causes male mice to attack both females and inanimate objects, as well as males. Pharmacogenetic silencing of VMHvl reversibly inhibits inter-male aggression. Immediate early gene analysis and single unit recordings from VMHvl during social interactions reveal overlapping but distinct neuronal subpopulations involved in fighting and mating. Neurons activated during attack are inhibited during mating, suggesting a potential neural substrate for competition between these opponent social behaviours. Certain regions of the hypothalamus are known to be important in aggression. Until recently, it has not been possible to learn much more than that because it was difficult to stimulate specific cell types within a mixed population of cells. David Anderson and colleagues have used optogenetics to solve this specificity problem, and find that optogenetic stimulation of neurons in a subdivision within the ventromedial hypothalamus can elicit inappropriate attack behaviours — but that electrical stimulation does not produce the same result. Additional analysis of genetic and electrophysiological activity revealed overlapping neuronal subpopulations involved in fighting and mating, with potential competition between these behaviours, as neurons activated during aggression are inhibited during mating. Certain regions of the hypothalamus are important in aggression, but until recently, it has been difficult to specifically stimulate specific cell types within a mixed population of cells. Here, optogenetics is used to solve this specificity problem, finding that optogenetic stimulation of a subdivision within the ventromedial hypothalamus can elicit inappropriate attack behaviours in mice, but electrical stimulation does not produce the same result. Additional analysis of genetic and electrophysiological activity revealed overlapping neuronal subpopulations involved in fighting and mating, with potential competition between these behaviours, as neurons activated during aggression are inhibited during mating.