Most flowering plants are hermaphroditic, having flowers with both male and female parts. Less than 4% of plant species are dioecious (with individuals of separate sexes), and many of these species have chromosome-mediated sex determination. The taxonomic distribution of separate sexes and chromosomal sex-determination systems in the flowering plants indicates that plant sex chromosomes have evolved recently through replicated, independent events, contrasting with the ancient origins of mammalian and insect sex chromosomes. Plant sex chromosomes, therefore, offer opportunities to study the most interesting early stages of the evolution of sex chromosomes. Here we show that a gene encoding a male-specific protein is linked to the X chromosome in the dioecious plant Silene latifolia, and that it has a degenerate homologue in the non-pairing region of the Y chromosome. The Y-linked locus has degenerated as a result of nucleotide deletion and the accumulation of repetitive sequences. We have identified both the first X-linked gene and the first pair of homologous sex-linked loci to be found in plants. The homology between the active X-linked locus and the degenerate Y-linked locus supports a common ancestry for these two loci.