In mammals, sex is determined by an XY male:XX female sex chromosome system in which a male-dominant gene on the Y chromosome (SRY) determines testis formation. Sex chromosomes evolved from an ordinary autosome pair as the Y chromosome was progressively degraded. The Y chromosome has lost nearly all of its 1500 original genes, and those that survived did so because they evolved a critical role in male determination or differentiation. SRY is typical of Y-borne genes. Comparative gene mapping and sequencing shows that SRY arose quite recently as a degraded version of the SOX3 gene on the X chromosome. SOX3 is expressed predominantly in brain, and so is more likely to be a brain-determining than a testis-determining gene. The male-dominant action of SRY may be an illusion, as its structure suggests that it works by interfering with the action of a related gene, which in turn inhibits testis development. This hypothesis can give a good account of how a brain-determining gene acquired a role in testis determination via differential dosage of SOX3. SRY has no central role in sex determination and it can be replaced as a trigger and lost, as have many other Y-borne genes in recent evolutionary history. The absence of SRY in two species of the mole vole (Ellobius) suggests that its useful life is already running out.