The molecular pathways controlling gender are highly variable and have been identified in only a few nonmammalian model species. In many insects, maleness is conferred by a Ychromosome-linked M factor of unknown nature. We have isolated and characterized a gene, Yob, for the M factor in the malaria mosquito Anopheles gambiae. Yob, activated at the beginning of zygotic transcription and expressed throughout a male's life, controls male-specific splicing of the doublesex gene. Silencing embryonic Yob expression is male-lethal, whereas ectopic embryonic delivery of Yob transcripts yields male-only broods. This female-killing property may be an invaluable tool for creation of conditional male-only transgenic Anopheles strains for malaria control programs.