Isolated rat heart perfusion and high-resolution phosphate-31 nuclear magnetic resonance (31P-NMR) spectroscopy were used to elucidate the effects of Mg during reperfusion of the ischemic myocardium. After an ischemic period of 9 min, the hearts were reperfused with 0, 0.6, or 2.4 mM Mg during the entire 24-min reperfusion period or with 15 mM Mg during the first 12 min before returning to the physiological concentration of 0.6 mM during the last 12 min. Free intracellular Mg calculated by 31P-NMR rose during ischemia and fell gradually during reperfusion. The two groups reperfused with 15 mM Mg exhibited a significantly enhanced rate of recovery of adenosine triphosphate, creatine phosphate, intracellular pH, and coronary flow rate than the three other groups. Myocardial potassium was significantly higher, and inorganic phosphate was significantly lower at the end of the reperfusion period in these groups. The hearts reperfused with 0 mM Mg presented a significantly higher frequency of ventricular fibrillation (VF) than the other groups. It is concluded that reperfusion with high Mg improves the postischemic recovery of metabolism and function in the rat heart, whereas a Mg-free reperfusion solution increases the frequency of VF.