and Mg + P into GaAs and A1GaAs/InGaAs/GaAs pseudomorphic heterostructure were evaluated by secondary ion mass spectrometry profilings and electrical resistivity measurements. Rapid thermal annealing causes a strong diffusion of Be when implanted alone. Co-implantation with P prevents both diffusion and degradation of the Gaussian-shape implant distribution and thus improves the semiconductor sheet resistivity. Annealing at 850~ for 10 s for a Be + P co-implant results in a 60% activation efficiency, and lower diffusion and resistivity when compared to single Be, Be + F, Be + F + P, BeF, and Mg + P implanted at the same dose.