This work examined the formation of a catalytically important microporous material, SAPO-34, in the presence of HF under hydrothermal synthesis conditions. The local environments of P, Al, F and Si atoms in several solid phases obtained at different stages of crystallization were characterized by several solid-state NMR techniques including 31P, 27Al, 19F and 29Si MAS, 27Al triple-quantum MAS, 31P{ 27Al} transfer of populations in double-resonance, 27Al{ 31P} rotational-echo double-resonance (REDOR), 27Al→ 31P heteronuclear correlation spectroscopy, 31P{ 19F} and 27Al{ 19F} REDOR as well as 1H→ 31P cross polarization. The NMR results provide the new insights into the formation of SAPO-34.