The local structural modifications resulting from chemical extraction and reinsertion of lithium in spinels of composition LiMn2O4 and Li4/3Mn5/3O4 have been investigated by X-ray absorption spectroscopy (XAS) at the manganese K-edge. For LiMn2O4, Mn-O and Mn-Mn distances determined from the extended X-ray absorption fine structure (EXAFS) decrease significantly when lithium is extracted in 0.1 M HCl, but are restored to their original values when similar to 90% of the lithium content is reconstituted by sorption in LiOH solution. The Mn-O and Mn-Mn distances for Li4/3Mn5/3O4 are shorter than for LiMn2O4, consistent with a higher manganese oxidation state and lower unit cell parameter for this compound, and show much smaller variations on lithium extraction and reinsertion. In addition lithium extraction from LiMn2O4 results in an increase in local structural order, followed by a return to the lower symmetry state of the parent material when lithium is reinserted. These changes are not observed in the spectra of Li4/3Mn5/3O4 and its delithiated or relithiated products, which show rather the effects of local structural perturbations due to manganese vacancies in octahedral sites. Evolution of the X-ray absorption near-edge structure (XANES), in particular the position of the main edge discontinuity and modifications in the pre-edge spectral structure, supports chemical analyses in showing that lithium extraction from LiMn2O4 produces a Mn-IV-type spinel oxide from a mixed Mn-III/Mn-IV parent material and that reinsertion of lithium results in a return to a mixed oxidation state. By contrast, the XANES data for Li4/3Mn5/3O4 show that here the dominant manganese state is Mn-IV and that lithium extraction and reinsertion entail only trivial local electronic changes. The XAS results are therefore compatible with a mainly redox mechanism for lithium extraction and reinsertion for LiMn2O4, but a predominantly ion-exchange process in the case of Li4/3Mn5/3O4, with the insertion of charge-compensating protons into the lattice.