The hammerhead ribozyme is one of the best studied ribozymes, but it still presents challenges for our understanding of RNA catalysis. It catalyzes a transesterification reaction that converts a 5',3' diester to a 2',3' cyclic phosphate diester via an S(N)2 mechanism. Thus, the overall reaction corresponds to that catalyzed by bovine pancreatic ribonuclease. However, an essential distinguishing aspect is that metal ions are not involved in RNase catalysis but appear to be important in ribozymes. Although various techniques have been used to assign specific functions to metals in the hammerhead ribozyme, their number and roles in catalysis is not clear. Two recent theoretical studies on RNA catalysis examined the reaction mechanism of a single-metal-ion model. A two-metal-ion model, which is supported by experiment and based on ab initio and density functional theory calculations, is described here. The proposed mechanism of the reaction has four chemical steps with three intermediates and four transition states along the reaction pathway. Reaction profiles are calculated in the gas phase and in solution. The early steps of the reaction are found to be fast (with low activation barriers), and the last step, corresponding to the departure of the leaving group, is rate limiting. This two-metal-ion model differs from the models proposed previously in that the two metal ions function not only as Lewis acids but also as general acids/bases. Comparison with experiment shows good agreement with thermodynamic and kinetic data. A detailed analysis based on natural bond orbitals (NBOs) and natural energy decomposition (NEDA) provides insights into the role of metal ions and other factors important for catalysis.