Magnesium implanted at high doses (1×1014cm−2 for a 120keV implant energy) into GaAs diffuses out of the crystal upon annealing. The outdiffusion is reduced, but not eliminated, when rapid thermal annealing is employed rather than furnace annealing. We have investigated various mechanisms that may explain this large outdiffusion. The high vapor pressure of the magnesium is not responsible for the outdiffusion since beryllium, which has a low vapor pressure, also outdiffuses. The presence of oxygen in the anneal ambient mostly leads to significant GaAs surface etching. The etching is more pronounced in the case of shallow energy and high dose implants, which suggests some oxygen- magnesium interaction mechanism. A high level of damage at the GaAs surface in the case of shallow magnesium implantation at high dose may also favor rapid outdiffusion of interstitial magnesium.