We report the effect of germanium as n-type dopant on the electrical and optical properties of AlxGa1-xN layers grown by plasma-assisted molecular-beam epitaxy. The Al content has been varied from x = 0 to 0.66, confirmed by Rutherford backscattering spectrometry, and the Ge concentration was increased up to [Ge] = 1×10 21 cm −3 . Even at these high doping levels (> 1% atomic fraction) Ge does not induce any structural degradation in AlxGa1-xN layers with x < 0.15. However, for higher Al compositions, clustering of Ge forming crystallites were observed. Hall effect measurements show a gradual decrease of the carrier concentration when increasing the Al mole fraction, which is already noticeable in samples with x = 0.24. Samples with x = 0.64-0.66 remain conductive (σ = 0.8-0.3 Ω −1 cm −1 ), but the donor activation rate drops to around 0.1% (carrier concentration around 1×10 18 cm −3 for [Ge] ≈ 1×10 21 cm −3 ). From the optical point of view, the low temperature photoluminescence is dominated by the band-to-band