GaN and AlxGa1-xN alloys were grown by gas sourer molecular beam epitaxy using NH3. High quality GaN layers with smooth surfaces being obtained, reflection high-energy electron diffraction (RHEED) can be used to monitor the growth. The oscillations of the specular beam intensity indicate a layer-by-layer growth which allows one to precisely measure the deposition rate and the composition of AlxGa1-xN alloys. The transition from two dimensional nucleation to step flow growth mode when increasing the substrate temperature is also evidenced, Finally, RHEED is used to investigate the relaxation processes which take place during the growth of AlN on GaN and GaN on ALN. (C) 1997 American Institute of Physics.