We have used a combination of in vitro selection and rational design to generate ribozymes that form a stable phosphoamide bond between the 5' terminus of an RNA and a specific polypeptide. This reaction differs from that of previously identified ribozymes, although the product is analogous to the enzyme-nucleotidyl intermediates isolated during the reactions of certain proteinaceous enzymes, such as guanyltransferase, DNA ligase, and RNA ligase. Comparative sequence analysis of the isolated ribozymes revealed that they share a compact secondary structure containing six stems arranged in a four-helix junction and branched pseudoknot. An optimized version of the ribozyme reacts with substrate-fusion proteins, allowing it to be used to attach RNA tags to proteins both in vitro and within bacterial cells, suggesting a simple way to tag a specific protein with amplifiable information.