There is a growing interest for the beneficial effect of magnesium (Mg) in cardiovascular disorders. A number of cardiovascular disorders including myocardial infarction, arrhythmias and congestive heart failure have been associated with low extra- cellular or intracellular concentrations of Mg. The efficiency of the preconditioning effect of Mg on cardiac function and infarct size in the globally ischemic-reperfused isolated rat heart was studied together with the role of ATP-sensitive potassium (K(ATP)) channels in protection induced by Mg. Rat hearts were Langendorff perfused, subjected to 30 min of global ischemia and 90 min of reperfusion, including treatment groups which focused on different times of Mg (8 mmol/l) use. Infarct size was measured by triphenyltetrazolium chloride (TTC) method. The left ventricular function was assessed by left ventricular developed pressure (LVDP), heart rate (HR) and coronary flow (CF). The administration of Mg before ischemia had an anti-infarct effect in rat hearts and improved cardiac function. The protective effects of magnesium was abolished by the blocking of K(ATP) channels and suggests that K-ATP channel has an important role in the heart protection effect of Mg as a preconditioning agent.