Transmission electron microscopy and x-ray diffraction were used to assess the microstructure and strain of AlxGa1-xN(x=0.61–0.64) layers grown on AlN. The compressively-strained AlGaN is partially relaxed by inclined threading dislocations, similar to observations on Si-doped AlGaN by P. Cantu, F. Wu, P. Waltereit, S. Keller, A. E. Romanov, U. K. Mishra, S. P. DenBaars, and J. S. Speck [Appl. Phys. Lett. 83, 674 (2003)]; however, in our material, the dislocations bend before the introduction of any Si. The bending may be initiated by the greater lattice mismatch or the lower dislocation density of our material, but the presence of Si is not necessarily required. The relaxation by inclined dislocations is quantitatively accounted for with the model of A. E. Romanov and J. S. Speck [Appl. Phys. Lett. 83, 2569 (2003)], and we demonstrate the predicted linear dependence of relaxation on layer thickness. Notably, such relaxation was not found in tensile strained AlGaN grown on GaN [J. A. Floro, D. M. Follstaedt, P. Provencio, S. J. Hearne, and S. R. Lee, J. Appl. Phys. 96, 7087 (2004)], even though the same mechanism appears applicable.