We investigate native point defects and rare-earth (co)dopants in SrAl2O4 using hybrid density-functional defect calculations. Europium (Eu) and dysprosium (Dy) are found to be mixed valence and energetically most favorable at the Sr lattice sites. However, unlike Eu where both Eu2+ and Eu3+ can be realized in synthesis, Dy is stable predominantly as Dy3+, and the divalent Dy2+ may only be photogenerated under irradiation. On the basis of an analysis of Eu-related band-defect (including charge-transfer) and interconfigurational 5d-4f optical transitions, we assign the characteristic broad blue (445 nm) and green (520 nm) emission bands in Eu2+-doped SrAl2O4 to the 4f65d1→4f7 transition in Eu2+ incorporated at the Sr1 and Sr2 sites, respectively. Strontium interstitials (not oxygen vacancies, in contrast to what is commonly believed) and DySr can act as efficient electron traps for room-temperature persistent luminescence. This work calls for a re-assessment of certain assumptions regarding specific carrier trapping centers made in all mechanisms previously proposed for the persistent luminescence in Eu- and (Eu,Dy)-doped SrAl2O4. It also serves as a methodological template for the understanding and design of rare-earth doped phosphors.