Si- and Mg-doped GaN layers were grown on c-plane sapphire substrates by molecular beam epitaxy with NH3 as the nitrogen precursor. Their optical and electrical properties were investigated by photoluminescence experiments and Hall measurements, respectively. P-type conductivity, with a net acceptor concentration of 3x10(17) cm(-3) and a mobility of 8 cm(2)/V s, was obtained. Mesa-etched light-emitting diodes were processed from p-n junctions. The turn-on voltage is 3 V and the forward current reaches 20 mA at 3.5 V. The room-temperature electroluminescence exhibits a strong emission at 390 nm. (C) 1998 American Institute of Physics.