Mg has been widely used as p-doping species despite its intrinsic difficulties. It is nowadays well established that during the growth process of Mg doped GaN, atomic H is generated from the decomposition of NH3 and Mg-H complexes are formed in the layer. This has been for instance shown by the occurrence of LO mode in IR absorption, and by the observation of the Mg-H local vibration modes. This H passivation limits the electrical activity of Mg, therefore an activation process is required to get full activation of the Mg atoms. In the present study, bismethylcyclopentadienyl magnesium [(MeCp)2Mg] was used as precursor. However, this precursor reacts in the gas phase with NH3 to produce tiny solid particles as evidenced by a very bright diffuse emission visible along the laser beam used for reflectometry measurements. This simplest obvious product would be [(MeCp)Mg(NH2)]m(m≥2). To limit this drawback, Ga and Mg precursor lines have been separated. With proper in situ heat treatment, doping densities up to 1.5×1018 cm−3 have been obtained. PL spectra of lightly Mg doped samples (1016 cm−3) are dominated by shallow donor-acceptor pairs whereas for higher doping densities ( 1018 cm−3), the luminescence is dominated by a broad band in the 2.7-2.9 eV range. GaN LEDs were fabricated from Si doped (n-type) and Mg-doped (p-type) GaN, these LEDs emit in the blue-UV range.