Optical properties and carrier dynamics of an AlGaN layer with an AlN content of 20% have been studied using time-resolved photoluminescence (TR-PL). Despite the high density of defects due to the relatively high AlN content, an intense PL emission from the sample has been detected. Low-temperature PL spectra exhibit several features, accompanied by a strong emission-wavelength dependence of the PL decay time. A significant red-shift of more than 200 meV from the band edge is recorded for the PL emission from localized states. Temperature-dependent PL spectra of the sample are dominated by the emission from localized states and, furthermore, show a relatively slight decrease by almost an order of magnitude with increasing temperature from 45 to 300 K. Our observations indicate strong, spatial localization effects of carriers, resulting in an increase in the radiative recombination rate.