Metastability of near band gap UV emissions in Mg-doped GaN layers grown by metal-organic vapor phase epitaxy on thick GaN templates grown by halide vapor phase epitaxy has been studied by cathodoluminescence (CL). The CL spectrum changes its initial shape within a few minutes under electron irradiation. The acceptor bound exciton line vanishes while the emissions related to the stacking faults (SFs) of different geometry rise significantly. The increase of the defect-related luminescence is likely caused by recombination enhanced SF formation under electron irradiation. The CL spectrum transformation is permanent at low temperatures, however, the metastable process is reversible if samples are heated to room temperature. © 2007 American Institute of Physics.