Low-lying plasma layers have been observed sporadically in the Martian atmosphere by radio occultation measurements from spacecraft such as the Mars Express Orbiter and the Mars Global Surveyor. These layers are just a few km wide, and tend to occur around 90 km. It has been proposed that the layers consist of metallic ions, for two reasons: they occur in the aerobraking region of the planet where meteoroids ablate; and they resemble sporadic E layers in the terrestrial atmosphere which are known to be composed principally of Fe+ and Mg+ ions. This paper addresses the problem of how metallic ions can persist in a CO2-rich atmosphere, where the ions should be neutralized rapidly by formation of metal–CO2 cluster ions followed by dissociative electron recombination. Laboratory studies using the pulsed laser photolysis/laser induced fluorescence and flow tube/mass spectrometer techniques were used to measure the following rate coefficients: k (Mg+ + CO2 (+ CO2) → Mg+.CO2, 190–403 K) = (5.3 ± 0.7) × 10−29 (T/300 K)(−1.86±0.03) cm6 molecule−2 s−1; k(Mg+.CO2 + O2 → MgO2+ + CO2, 297 K) = (2.2 ± 0.8) × 10−11 cm3 molecule−1 s−1; k(MgO2+ + O → MgO+ + O2, 297 K) = (6.5 ± 1.8) × 10−10 cm3 molecule−1 s−1; and k(MgO+ + O → Mg+ + O2, 297 K) = (5.9 ± 2.4) × 10−10 cm3 molecule−1 s−1. A model of magnesium and iron chemistry in the Martian atmosphere was then constructed, which includes meteoric differential ablation rates calculated with the Leeds CABMOD model, photo-ionization, and gas-phase ion–molecule and neutral chemistry. The model shows that nearly all the metallic ions between 70 and 110 km should be Mg+, because the reactions of MgO2+ and MgO+ with atomic O are fast enough to prevent these molecular ions undergoing dissociative electron recombination (unlike the analogous Fe species). There are enough Mg+ ions to form sporadic layers of the observed plasma density, and the layers can have a lifetime against neutralization in excess of 20 h.