Photoluminescence of gallium nitride (GaN) layers 7.5-870 mum thick was studied with changes in temperature and excitation intensity. These layers were grown by hydride vapor phase epitaxy on a buffer layer of aluminum nitride (AlN). The photoluminescence emission consists of the shallow-donor bound exciton at 3.471 eV and the free hole-to-electron bound to a donor (possibly a nitrogen vacancy V-N or oxygen) transition at 3.40-3.433 eV. The peak position varies depending on the thickness of the GaN and AlN layers. The localized donor due to donor concentration fluctuation is attributed to the variable peak position. The observed 3.269 eV emission is attributed to a donor-acceptor pair transition. The relationship between the peak and the excitation intensity is described accurately by a theoretical description which yields E-d = 32 meV and E-a = 230 meV, which originate, respectively, from a silicon donor and carbon acceptor. (C) 2001 American Institute of Physics.