Neutron diffraction has been used to study the progress of deformation twinning and intergranular strain evolution in extruded magnesium during cyclic and monotonic loading at two temperatures. Differences in the intergranular strains generated during tensile and compressive tests are attributed to the operation of twinning in compression. Twinning activity is reduced relative to slip at higher temperature, leading to greater similarities between tension and compression. During cyclic loading, a distinct Bauschinger effect is observed after each compressive loading stage. The origin of this effect is identified as the reversal of twinning during unloading and subsequent tensile loading.