At some stage in the origin of life, an informational polymer must have arisen by purely chemical means. According to one version of the 'RNA world' hypothesis this polymer was RNA, but attempts to provide experimental support for this have failed. In particular, although there has been some success demonstrating that 'activated' ribonucleotides can polymerize to form RNA, it is far from obvious how such ribonucleotides could have formed from their constituent parts (ribose and nucleobases). Ribose is difficult to form selectively, and the addition of nucleobases to ribose is inefficient in the case of purines and does not occur at all in the case of the canonical pyrimidines. Here we show that activated pyrimidine ribonucleotides can be formed in a short sequence that bypasses free ribose and the nucleobases, and instead proceeds through arabinose amino-oxazoline and anhydronucleoside intermediates. The starting materials for the synthesis-cyanamide, cyanoacetylene, glycolaldehyde, glyceraldehyde and inorganic phosphate-are plausible prebiotic feedstock molecules, and the conditions of the synthesis are consistent with potential early-Earth geochemical models. Although inorganic phosphate is only incorporated into the nucleotides at a late stage of the sequence, its presence from the start is essential as it controls three reactions in the earlier stages by acting as a general acid/base catalyst, a nucleophilic catalyst, a pH buffer and a chemical buffer. For prebiotic reaction sequences, our results highlight the importance of working with mixed chemical systems in which reactants for a particular reaction step can also control other steps.