The Drosophila Pax gene paired encodes a transcription factor that is required for the activation of segment-polarity genes and proper segmentation of the larval cuticle, postembryonic viability and male fertility. We show that paired executes a dual role in the development of male accessory glands, the organ homologous to the human prostate. An early function is necessary to promote cell proliferation, whereas a late function, which regulates the expression of accessory gland products such as the sex peptide and Acp26Aa protein, is essential for maturation and differentiation of accessory glands. The late function exhibits in main and secondary secretory cells of accessory glands dynamic patterns of Paired expression that depend in both cell types on the mating activity of adult males, possibly because Paired expression is regulated by negative feedback. The early Paired function depends on domains or motifs in its C-terminal moiety and the late function on the DNA-binding specificity of its N-terminal paired-domain and/or homeodomain. Both Paired functions are absolutely required for male fertility, and both depend on an enhancer located within 0.8 kb of the downstream region of paired.