The electrochemical insertion and deinsertion of H+ was investigated by studying its influence on the evolution of the crystallographic structure of gamma-MnO2 of EMD type (electrochemical method deposition) during the discharge and recharge processes of an alkaline battery, using in situ x-ray diffraction. During the first discharge, proton insertion up to X = 0.4 H+ per MnO2 with concomitant electron transfer causes an expansion of the MnO2 crystalline cell. The lattice expansion is attributed to the reduction of Mn4+ ions to Mn3+ ions which have a larger ionic radius. Between 0.5 to 0.8 H+ inserted the long-range order is lost and the presence of a quasi-amorphous phase which could not be identified is detected. This amorphous phase is reduced to gamma-Mn2O3 (or Mn3O4) and to Mn(OH)2 when more than 0.8 H+ is inserted. On recharge, the Mn(OH)2 is oxidized to gamma-Mn2O3 (or Mn3O4) leading to poor cycling of the battery. When the discharge is limited to 0.8 H+ the battery can be recharged and cycled many times. Still more cycles can be obtained when the discharge is limited to 0.5 H+, corresponding to the range where the gamma-MnO2 structure is retained. In this range, strong hysteresis in the voltage curves indicated that while there is structural reversibility, structural changes arise at different voltages on discharge and recharge.