Thin AlN interlayers are widely used in (In,Al,Ga)N based high-electron-mobility transistors to improve the mobility of the two-dimensional electron gas forming at the GaN/(In,Al,Ga)N interface. AlN layers grown by metal-organic chemical vapor deposition, however, were recently shown to contain high amounts of gallium caused by carry over reactions, resulting in AlxGa1−xN layers with x ∼ 0.5 under typical deposition conditions. By modifying the AlN growth conditions in this study, layers with an Al mole fraction up to 0.78 were obtained. The unintentional Ga incorporation had a negligible effect on the electronic properties of GaN/AlN/AlGaN structures with nominally 0.7 nm thick AlN interlayer and sheet carrier densities in the order of 1 × 1013 cm−3. It resulted, however, in low electron mobility values for samples with thicker nominal AlN layers and/or higher sheet carrier densities.