The evolution of the amorphous calcium phosphate (ACP), precipitated at 25 degrees C from solutions of concentration [Ca] = [P] = 5 mM at pH = 7.94, was followed at fixed time intervals by combined X-ray, electron diffraction and TEM imaging. The same runs were carried out in the presence of magnesium ions (C = 1 mM). Only one kind of amorphous compound was observed (ACP1), which seems to change directly into apatite (HAP) without crystalline intermediate. Edge dislocations and grain boundaries were found by HRTEM analysis in HAP. The effects of magnesium on conversion of ACP into HAP and on the crystal structure and habit of HAP are interpreted in terms of incorporation and surface adsorption.