GaN epitaxial films were grown on c-face sapphire substrates by metalorganic chemical vapor deposition (MOCVD) with an in situ SiNx deposition insert ed into the normal growth process. The in situ SiNx deposition makes a nanomask on GaN, followed by the epitaxial lateral overgrowth on it. Raman spe ctra and photoluminescence are used to study the stress state of the resulting G aN film. The formation of SiNx nanomask leads to a 2D-3D growth mode transition, which ends in the total coalesce of the GaN film. The distribution o f stress state in this kind of GaN film is more uniform than that of films grown by the conventional epitaxial lateral overgrowth. The data about the relaxation of the stress deduced by the Raman spectra match well with those obtained by ph otoluminescence. These data also show that the more residual stress in the GaN f ilm grown on the SiNx nanomask is relaxed when the time of in situ Si Nx deposition is increased. This is because with the increasing time of in situ SiNx deposition, the wing area of epitaxial lateral overgr owth becomes larger, which will reduce the stress in the GaN thin film grown on it.