The effect of temperature on the main deformation mechanisms of pure magnesium (Mg) was investigated using nanoindentation combined with atomic force microscopy, electron backscatter diffraction and finite element crystal plasticity simulations. While twinning is clearly apparent near the indents performed at room temperature, almost no twinning activity was detected at 300°C. The analysis of the residual imprints confirms that the decrease of the twin activity with temperature is compensated by a profuse activation of the prismatic slip systems.