Lattice parameters of gallium nitride were measured using high‐resolution x‐ray diffraction. The following samples were examined: (i) single crystalsgrown at pressure of about 15 kbar, (ii) homoepitaxial layers, (iii) heteroepitaxial layers (wurtzite structure) on siliconcarbide, on sapphire, and on gallium arsenide, (iv) cubic gallium nitride layers on gallium arsenide. The differences between the samples are discussed in terms of their concentrations of free electrons and structuraldefects.