1. As ATP has a higher affinity for Mg2+ than ADP, the cytosolic magnesium concentration rises upon ATP hydrolysis. We have therefore used the Mg(2+)-sensitive fluorescent indicator Magnesium Green (MgG) to provide an index of changing ATP concentration in single rat cardiomyocytes in response to altered mitochondrial state. 2. In response to FCCP, [Mg2+]i rose towards a plateau coincident with the progression to rigor, which signals ATP depletion. Contamination of the MgG signal by changes in intracellular free Ca2+ concentration (the KD of MgG for Ca2+ is 4.7 microM) was excluded by simultaneous measurement of [Ca2+]i and [Mg2+]i in cells dual loaded with fura-2 and MgG. The response to FCCP was independent of external Mg2+, confirming an intracellular source for the rise in [Mg2+]i. 3. Simultaneous measurements of mitochondrial NAD(P)H autofluorescence and mitochondrial potential (delta psi m; .-1 fluorescence) and of autofluorescence and MgG allowed closer study of the relationship between [Mg2+]i and mitochondrial state. Oligomycin abolished the FCCP-induced rise in [Mg2+]i without altering the change in autofluorescence. Thus, the rise in [Mg2+]i in response to FCCP is consistent with the release of intracellular Mg2+ following ATP hydrolysis by the mitochondrial F1F0-ATPase. 4. The rise in [Mg2+]i was correlated with cell-attached recordings of ATP-sensitive K+ channel (KATP) activity. In response to FCCP, an increase in KATP channel activity was seen only as [Mg2+]i reached a plateau. In response to blockade of mitochondrial respiration and glycolysis with cyanide (CN-) and 2-deoxyglucose (DOG), [Mg2+]i rose more slowly but again KATP channel opening increased only when [Mg2+]i reached a plateau and the cells shortened. 5. Oligomycin decreased the rate of rise of [Mg2+]i delayed the onset of rigor and increased the rate of mitochondrial depolarization in response to CN-_DOG. Thus, with blockade of mitochondrial respiration delta psi m is maintained by the mitochondrial F1F0-ATPase at the expense of ATP reserves. 6. In response to CN-_DOG, the initial rise in [Mg2+]i was accompanied by a small rise in [Ca2+]i. After [Mg2+]i reached a plateau and rigor developed, [Ca2+]i rose progressively. On reperfusion, in hypercontracted cells, [Ca2+]i recovered before [Mg2+]i and [ca2+]i oscillations were sustained while [Mg2+]i decreased. Thus on reperfusion, full recovery of [ATP]i is slow, but the activation of contractile elements and the restoration of [Ca2+]i does not require the re-establishment of millimolar concentrations of ATP.