Nonenzymatic template-directed RNA copying requires catalysis by divalent metal ions. The primer extension reaction involves the attack of the primer 3'-hydroxyl on the adjacent phosphate of a 5'-5'-imidazolium-bridged dinucleotide substrate. However, the nature of the interaction of the catalytic metal ion with the reaction center remains unclear. To explore the coordination of the catalytic metal ion with the imidazolium-bridged dinucleotide substrate, we examined catalysis by oxophilic and thiophilic metal ions with both diastereomers of phosphorothioate-modified substrates. We show that Mg2+ and Cd2+ exhibit opposite preferences for the two phosphorothioate substrate diastereomers, indicating a stereospecific interaction of the divalent cation with one of the nonbridging phosphorus substituents. High-resolution X-ray crystal structures of the products of primer extension with phosphorothioate substrates reveal the absolute stereochemistry of this interaction and indicate that catalysis by Mg2+ involves inner-sphere coordination with the nonbridging phosphate oxygen in the pro-SP position, while thiophilic cadmium ions interact with sulfur in the same position, as in one of the two phosphorothioate substrates. These results collectively suggest that during nonenzymatic RNA primer extension with a 5'-5'-imidazolium-bridged dinucleotide substrate the interaction of the catalytic Mg2+ ion with the pro-SP oxygen of the reactive phosphate plays a crucial role in the metal-catalyzed SN2(P) reaction.