  Combining conservation of energy throughout nearly-spherical collapse of
galaxy clusters with the virial theorem, we derive the mass-temperature
relation for X-ray clusters of galaxies $T=CM^{2/3}$. The normalization factor
$C$ and the scatter of the relation are determined from first principles with
the additional assumption of initial Gaussian random field. We are also able to
reproduce the recently observed break in the M-T relation at $T \sim 3 \keV$,
based on the scatter in the underlying density field for a low density
$\Lambda$CDM cosmology. Finally, by combining observational data of high
redshift clusters with our theoretical formalism, we find a semi-empirical
temperature-mass relation which is expected to hold at redshifts up to unity
with less than 20% error.
