Mg-doped GaN epitaxial layers were annealed in pure O-2 and pure N-2. It was found that we could achieve a low-resistive p-type GaN by pure O-2 annealing at a temperature as low as 400 degreesC. With a 500 degreesC annealing temperature, it was found that