We report on the photoluminescence ͑PL͒ properties of in situ Tm-doped Al x Ga 1Ϫx N films (0рx р1) grown by solid-source molecular-beam epitaxy. It was found that the blue PL properties of Al x Ga 1Ϫx N:Tm greatly change as a function of Al content. Under above-gap pumping, GaN:Tm exhibited a weak blue emission at ϳ478 nm from the 1 G 4 → 3 H 6 transition of Tm 3ϩ . Upon increasing Al content, an enhancement of the blue PL at 478 nm was observed. In addition, an intense blue PL line appeared at ϳ465 nm, which is assigned to the 1 D 2 → 3 F 4 transition of Tm 3ϩ . The overall blue PL intensity reached a maximum for xϭ0.62, with the 465 nm line dominating the visible PL spectrum. Under below-gap pumping, AlN:Tm also exhibited intense blue PL at 465 and 478 nm, as well as several other PL lines ranging from the ultraviolet to near-infrared. The Tm 3ϩ PL from AlN:Tm was most likely excited through defect-related complexes in the AlN host.