We have investigated donor levels and the local structure of DX centers in Si-doped AlxGa0.51−xIn0.49P grown by gas-source molecular-beam epitaxy. In a ternary alloy Ga0.51In0.49P, Si donors form only shallow donor states. In contrast, in quaternary alloys with x≥0.25 a deep electron trapping center is observed. Hall measurements reveal an activated behavior of the mobile electron concentration, and the thermal binding energy of the dominant donor state is ∼0.1 eV when the Al fraction is x=0.25. Illumination with infrared or red light results in persistent photoconductivity at T≤120 K. The appearance of the DX level in the band gap around x≊0.1 gives a consistent picture of the experimental findings. Positron annihilation spectroscopy shows that the Si DX center is a vacancylike defect with a local structure equivalent to that found earlier in AlxGa1−xAs. The very different core shell structures of the group-III (Ga, In) and group-V (P) atoms give direct evidence that the vacancy has P atoms as its nearest neighbors and we identify it as a vacancy in the group-III sublattice. The structural data give support to the vacancy-interstitial model, which predicts that the donor impurities can take two different configurations in sp-bonded semiconductors.