  We derive the dominant part of the O(\alpha_s^2) correction to the photon
energy spectrum in the inclusive decay B-> X_s+gamma. The detailed knowledge of
the spectrum is important for relating the theoretical calculations of the B->
X_s + \gamma decay rate and the experimental measurements where a cut on the
photon energy is applied. In addition, moments of the photon energy spectrum
are used for the determination of the b-quark mass and other fundamental
parameters of heavy quark physics. Our calculation reduces the theoretical
uncertainty associated with uncalculated higher orders effects and shows that,
for B-> X_s+\gamma, QCD radiative corrections to the photon energy spectrum are
under theoretical control.
