We study the defect properties of P dopants in ZnO through first-principles pseudopotential calculations. Because of the large size-mismatch between the P and O atoms, the acceptor level of a substitutional P (Po) at an O lattice site is deeper than for N acceptors. A substitutional P (P-Zn) at a Zn antisite is found to be the dominant donor. Under Zn-rich condition, the P-Zn donors are abundant, leading to n-type ZnO. As going to O-rich condition, Zn vacancies (V-Zn) are energetically more favorable than the P-O acceptors. Energy-lowering interactions between the PZn defect and two Zn vacancies stabilizes the formation of a P-Zn-2V(Zn) complex, with a shallow acceptor level. This defect complex is suggested to be an important species in giving p-type ZnO together with the Zn vacancy. (c) 2005 Elsevier B.V. All rights reserved.