The growth of GaN layers was carried out on c-plane sapphire substrates by molecular beam epitaxy (MBE) using NH3. Undoped GaN layers were grown at 830°C with growth rates larger than 1 μm/h. Optical properties are characteristics of high quality GaN material and the linewidth of x-ray diffraction (0002) rocking curve is less than 350 arcsec. N- and p-type doping were achieved by using solid sources of Si and Mg. No post-growth annealing was needed to activate the Mg acceptors. As-grown GaN:Mg layers exhibit hole concentrations of 3×1017 cm−3and mobilities of 8 cm2/Vs at 300 K. Light emitting diodes (LEDs) based on GaN p-n homojunction have been processed. The turn on voltage is 3 V and the forward voltage is 3.7 V at 20 mA. The 300 K electroluminescence (EL) peaks at 390 nm.