  Cr$^{3+}$ doped spinel compounds AB$_2$O$_4$ with A=Zn, Mg and B=Ga, Al
exhibit a long near infrared persistent luminescence when excited with UV or
X-rays. In addition, persistent luminescence of ZnGa$_2$O$_4$ and to a lesser
extent MgGa$_2$O$_4$, can also be induced by visible light excitation via
$^4$A$_2$ $ \rightarrow $ $^4$T$_2$ transition of Cr$^{3+}$, which makes these
compounds suitable as biomarkers for in vivo optical imaging of small animals.
We correlate this peculiar optical property with the presence of antisite
defects, which are present in ZnGa$_2$O$_4$ and MgGa$_2$O$_4$. By using X-ray
absorption fine structure (XAFS) spectroscopy, associated with electron
paramagnetic resonance (EPR) and optical emission spectroscopy, it is shown
that an increase in antisite defects concentration results in a decrease in the
Cr-O bond length and the octahedral crystal field energy. A part of the defects
are in the close environment of Cr$^{3+}$ ions, as shown by the increasing
strain broadening of EPR and XAFS peaks observed upon increasing antisite
disorder. It appears that ZnAl$_2$O$_4$, which exhibits the largest crystal
field splitting of Cr$^{3+}$ and the smallest antisite disorder, does not show
considerable persistent luminescence upon visible light excitation as compared
to ZnGa$_2$O$_4$ and MgGa$_2$O$_4$. These results highlight the importance of
Cr$^{3+}$ ions with neighboring antisite defects in the mechanism of persistent
luminescence exhibited by Cr$^{3+}$ doped AB$_2$O$_4$ spinel compounds.
