A scanned cw Nd: YAG laser was used to anneal ion-implanted GaAs and InP wafers. Measurements show that electrical activation is greater for p-type than for n-type dopants in GaAs, while in InP, the opposite is observed. A simple Fermi-level pinning model is presented to explain not only the electrical properties we have measured, but also those observed by other workers. We have fabricated GaAs and InP solar cells with junctions formed by ion implantation followed by laser annealing. The GaAs cells have much better conversion efficiencies than the InP cells, and this difference can be explained in terms of the model.