The effects of changing cytosolic [Mg(2+)] ([Mg(2+)](i)) on L-type Ca(2+) currents were investigated in rat cardiac ventricular myocytes voltage-clamped with patch pipettes containing salt solutions with defined [Mg(2+)] and [Ca(2+)]. To control [Mg(2+)](i) and cytosolic [Ca(2+)] ([Ca(2+)](i)), the pipette solution included 30 mM citrate and 10 mM ATP along with 5 mM EGTA (slow Ca(2+) buffer) or 15 mM EGTA plus 5 mM BAPTA (fast Ca(2+) buffer). With pipette [Ca(2+)] ([Ca(2+)](p)) set at 100 nM using a slow Ca(2+) buffer and pipette [Mg(2+)] ([Mg(2+)](p)) set at 0.2 mM, peak l-type Ca(2+) current density (I(Ca)) was 17.0 +/- 2.2 pA pF(-1). Under the same conditions, but with [Mg(2+)](p) set to 1.8 mM, I(Ca) was 5.6 +/- 1.0 pA pF(-1), a 64 +/- 2.8% decrease in amplitude. This decrease in I(Ca) was accompanied by an acceleration and a -8 mV shift in the voltage dependence of current inactivation. The [Mg(2+)](p)-dependent decrease in I(Ca) was not significantly different when myocytes were preincubated with 10 microM forskolin and 300 microM 3-isobutyl-L-methylxanthine and voltage-clamped with pipettes containing 50 microM okadaic acid, to maximize Ca(2+) channel phosphorylation. However, when myocytes were voltage-clamped with pipettes containing protein phosphatase 2A, to promote channel dephosphorylation, I(Ca) decreased only 25 +/- 3.4% on changing [Mg(2+)](p) from 0.2 to 1.8 mM. In the presence of 0.2 mM[Mg(2+)](p), changing channel phosphorylation conditions altered I(Ca) over a 4-fold range; however, with 1.8 mM[Mg(2+)](p), these same manoeuvres had a much smaller effect on I(Ca). These data suggest that [Mg(2+)](i) can antagonize the effects of phosphorylation on channel gating kinetics. Setting [Ca(2+)](p) to 1, 100 or 300 nM also showed that the [Mg(2+)](p)-induced reduction of I(Ca) was smaller at the lowest [Ca(2+)](p), irrespective of channel phosphorylation conditions. This interaction between [Ca(2+)](i) and [Mg(2+)](i) to modulate I(Ca) was not significantly affected by ryanodine, fast Ca(2+) buffers or inhibitors of calmodulin, calmodulin-dependent kinase and calcineurin. Thus, physiologically relevant [Mg(2+)](i) modulates I(Ca) by counteracting the effects of Ca(2+) channel phosphorylation and by an unknown [Ca(2+)](i)-dependent mechanism. The magnitude of these effects suggests that changes in [Mg(2+)](i) could be critical in regulating L-type channel gating.