Females of many animal species behave very differently before and after mating. In Drosophila melanogaster, changes in female behavior upon mating are triggered by the sex peptide (SP), a small peptide present in the male's seminal fluid. SP activates a specific receptor, the sex peptide receptor (SPR), which is broadly expressed in the female reproductive tract and nervous system. Here, we pinpoint the action of SPR to a small subset of internal sensory neurons that innervate the female uterus and oviduct. These neurons express both fruitless (fru), a marker for neurons likely to have sex-specific functions, and pickpocket (ppk), a marker for proprioceptive neurons. We show that SPR expression in these fru+ ppk+ neurons is both necessary and sufficient for behavioral changes induced by mating. These neurons project to regions of the central nervous system that have been implicated in the control of reproductive behaviors in Drosophila and other insects.