We report on plasma‐assisted molecular beam epitaxy (PA MBE) growth of Mg‐doped GaN and AlxGa1–xN (x = 0.15 and 0.42) layers on c‐sapphire (N‐polarity) and studies of their electrical properties as functions of growth temperature, Mg flux and alloy composition. P‐type conductivity was examined to follow the general trends defined for MOVPE and Ga‐polar GaN layers grown by metal‐organic vapor phase epitaxy and MBE. The achieved hole concentration in the GaN:Mg layers measured by Hall effect and C‐V is in the range of (0.3 – 2)×1018 cm–3 at Mg BEP changing within (2 – 7)×10–9 Torr. Hall hole concentration p = 4×1017 cm–3 and mobility μ = 1.4 cm2/Vs at 250 K have been measured for the first time in AlxGa1–xN with x > 0.4 grown by PA MBE. Acceptor activation energies for GaN:Mg and Al0.15Ga0.85N:Mg epilayers were determined from temperature dependences of resistivity at T ≥ 300 K to be EA ∼ 100 meV and 220 meV, respectively. Hopping mechanism of conductivity was confirmed for AlxGa1–xN:Mg layers studied at T ≤ 300 K. (© 2009 WILEY‐VCH Verlag GmbH & Co. KGaA, Weinheim)