Lead halogen perovskites, and particularly methylammonium lead iodine, CH3NH3PbI3, have recently attracted considerable interest as alternative solar cell materials, and record solar cell efficiencies have now surpassed 20%. Concerns have, however, been raised about the thermal stability of methylammonium lead iodine, and a phase transformation from a tetragonal to a cubic phase has been reported at elevated temperature. Here, this phase transition has been investigated in detail using temperature-dependent X-ray diffraction measurements. The phase transformation is pinpointed to 54 degrees C, which is well within the normal operating range of a typical solar cell. The cell parameters were extracted as a function of the temperature, from which the thermal expansion coefficient was calculated. The latter was found to be rather high (alpha(v) = 1.57 X 10(-4) K-1) for both the tetragonal and cubic phases. This is 6 times higher than the thermal expansion coefficient for soda lime glass and CIGS and 11 times larger than that of CdTe. This could potentially be of importance for the mechanical stability of perovskite solar cells in the temperature cycling experienced under normal day night operation. The experimental knowledge of the thermal expansion coefficients and precise determination of the cell parameters can potentially also be valuable while conducting density functional theory simulations on these systems in order to deliver more accurate band structure calculations.