The posttranslational modifier ubiquitin is encoded by a multigene family containing three primary members, which yield the precursor protein polyubiquitin and two ubiquitin moieties, Ub(L40) and Ub(S27), that are fused to the ribosomal proteins L40 and S27, respectively. The gene encoding polyubiquitin is highly conserved and, until now, those encoding Ub(L40) and Ub(S27) have been generally considered to be equally invariant. The evolution of the ribosomal ubiquitin moieties is, however, proving to be more dynamic. It seems that the genes encoding Ub(L40) and Ub(S27) are actively maintained by homologous recombination with the invariant polyubiquitin locus. Failure to recombine leads to deterioration of the sequence of the ribosomal ubiquitin moieties in several phyla, although this deterioration is evidently constrained by the structural requirements of the ubiquitin fold. Only a few amino acids in ubiquitin are vital for its function, and we propose that conservation of all three ubiquitin genes is driven not only by functional properties of the ubiquitin protein, but also by the propensity of the polyubiquitin locus to act as a 'selfish gene'.