We report on structural, optical, and electrical properties of AlxInyGa1−x−yNGaN heterostructures grown on sapphire and 6H–SiC substrates. Our results demonstrate that incorporation of In reduces the lattice mismatch, Δa, between AlInGaN and GaN, and that an In to Al ratio of close to 1:5 results in nearly strain-free heterostructures. The observed reduction in band gap, ΔEg, determined from photoluminescence measurements, is more than 1.5 times higher than estimated from the linear dependencies of Δa and ΔEg on the In molar fraction. The incorporation of In and resulting changes in the built-in strain in AlInGaN/GaN heterostructures strongly affect the transport properties of the two-dimensional electron gas at the heterointerface. The obtained results demonstrate the potential of strain energy band engineering for GaN-based electronic applications. © 2000 American Institute of Physics.