Comprehensive photoluminescence (PL) and optically detected magnetic resonance (ODMR) experiments have been performed on a set of GaN epitaxial layers doped with Mg from 2.5×10 18 to 5.0×10 19 cm −3 . Strong shallow donor–shallow acceptor recombination at 3.27eV is observed from the lowest-doped sample while broad emission bands at 2.8 and 3.2eV were found from the more heavily doped films. ODMR at 24GHz on these bands reveals evidence for effective-mass shallow donors and Mg-related acceptors with unique g-tensors, including the first observation of the resonance parameters (g || =2.113(4) and g ⊥ =1.970(5)) associated with Mg shallow acceptors in GaN.