The 'RNA world' hypothesis proposes that early life developed by making use of RNA molecules, rather than proteins, to catalyse the synthesis of important biological molecules. It is thought, however, that the nucleotides constituting RNA were scarce on early Earth. RNA-based life must therefore have acquired the ability to synthesize RNA nucleotides from simpler and more readily available precursors, such as sugars and bases. Plausible prebiotic synthesis routes have been proposed for sugars, sugar phosphates and the four RNA bases, but the coupling of these molecules into nucleotides, specifically pyrimidine nucleotides, poses a challenge to the RNA world hypothesis. Here we report the application of in vitro selection to isolate RNA molecules that catalyse the synthesis of a pyrimidine nucleotide at their 3' terminus. The finding that RNA can catalyse this type of reaction, which is modelled after pyrimidine synthesis in contemporary metabolism, supports the idea of an RNA world that included nucleotide synthesis and other metabolic pathways mediated by ribozymes.