The influence of foreign ions on the crystal lattice of hydroxyapatite (precipitated from aqueous solution by a conventional method at 96 C with a given ratio of Ca/P=1.67:1) was studied during heating in air in the temperature range of 25-1250 C. The lattice constants decreased to those of stoichiometric hydroxyapatite by a complex dependence during heating. This dependence was correlated to a simultaneous release of gaseous products. These products resulted from the decomposition of foreign ions which were incorporated into the hydroxyapatite lattice during precipitation, i.e. ammonium, nitrate and carbonate. Stoichiometric hydroxyapatite with correct lattice constants was obtained at 1100 C. Further heating to 1250 C resulted in only minor changes in the lattice characteristics.