Insect immune defense is mainly based on humoral factors like antimicrobial peptides (AMPs) that kill the pathogens directly or on cellular processes involving phagocytosis and encapsulation by hemocytes. In Drosophila, the Toll pathway (activated by fungi and gram-positive bacteria) and the Imd pathway (activated by gram-negative bacteria) lead to the synthesis of AMPs. But AMP genes are also regulated without pathogenic challenge, e.g., by aging, circadian rhythms, and mating. Here, we show that AMP genes are differentially expressed in mated females. Metchnikowin (Mtk) expression is strongly stimulated in the first 6 hr after mating. Sex-peptide (SP), a male seminal peptide transferred during copulation, is the major agent eliciting transcription of Mtk and of other AMP genes. Both pathways are needed for Mtk induction by SP. Furthermore, SP induces additional AMP genes via the Toll (Drosomycin) and the Imd (Diptericin) pathways. SP affects the Toll pathway at or upstream of the gene spätzle, the Imd pathway at or upstream of the gene imd. Mating may physically damage females and pathogens may be transferred. Thus, endogenous stimulation of AMP transcription by SP at mating might be considered as a preventive step to encounter putative immunogenic attacks.