Background: Many new ribozymes, including sequence-specific nucleases, ligases and kinases, have been isolated by in vitro selection from large pools of random-sequence RNAs. We are attempting to use in vitro selection to isolate new ribozymes that have, or can be evolved to have, RNA polymerase-like activities. As phosphorimidazolide-activated nucleosides are extensively used to study non-enzymatic RNA replication, we wished to select for a ribozyme that would accelerate the template-directed ligation of 5'-phosphorimidazolide-activated oligonucleotides. Results: Ribozymes selected to perform the desired template-directed ligation reaction instead ligated themselves to the activated substrate oligonucleotide via their 5'-triphosphate, generating a 5'-5' P-1,P-4-tetraphosphate linkage. Deletion analysis of one of the selected sequences revealed that a 54-nucleotide RNA retained activity; this small ribozyme folds into a pseudoknot secondary structure with an internal binding site for the substrate oligonucleotide. The ribozyme can also synthesize 5'-5' triphosphate and 5'-5' pyrophosphate linkages. Conclusions: The emergence of ribozymes that accelerate an unexpected 5'-5' ligation reaction from a selection designed to yield template-dependent 3'-5' ligases suggests that it may be much easier for RNA to catalyze the synthesis of 5'5' Linkages than 3'5' linkages. 5'-5' linkages are found in a variety of contexts in present-day biology. The ribozyme-catalyzed synthesis of such linkages raises the possibility that these 5'-5' linkages originated in the biochemistry of the RNA world.