Background: There is currently no effective AIDS vaccine, emphasizing the importance of developing alternative therapies. Recently, a patient was successfully transplanted with allogeneic, naturally resistant CCR5-negative (CCR5 delta 32) cells, setting the stage for transplantation of naturally resistant, or genetically modified stem cells as a viable therapy for AIDS. Hematopoietic stem cell (HSC) gene therapy using vectors that express various anti-HIV transgenes has also been attempted in clinical trials, but inefficient gene transfer in these studies has severely limited the potential of this approach. Here we evaluated HSC gene transfer of an anti-HIV vector in the pigtailed macaque (Macaca nemestrina) model, which closely models human transplantation. Methods and Findings: We used lentiviral vectors that inhibited both HIV-1 and simian immunodeficiency virus (SIV)/HIV-1 (SHIV) chimera virus infection, and also expressed a P140K mutant methylguanine methyltransferase (MGMT) transgene to select gene-modified cells by adding chemotherapy drugs. Following transplantation and MGMT-mediated selection we demonstrated transgene expression in over 7% of stem-cell derived lymphocytes. The high marking levels allowed us to demonstrate protection from SHIV in lymphocytes derived from gene-modified macaque long-term repopulating cells that expressed an HIV-1 fusion inhibitor. We observed a statistically significant 4-fold increase of gene-modified cells after challenge of lymphocytes from one macaque that received stem cells transduced with an anti-HIV vector (p<0.02, Student's t-test), but not in lymphocytes from a macaque that received a control vector. We also established a competitive repopulation assay in a second macaque for preclinical testing of promising anti-HIV vectors. The vectors we used were HIV-based and thus efficiently transduce human cells, and the transgenes we used target HIV-1 genes that are also in SHIV, so our findings can be rapidly translated to the clinic. Conclusions: Here we demonstrate the ability to select protected HSC-derived lymphocytes in vivo in a clinically relevant nonhuman primate model of HIV/SHIV infection. This approach can now be evaluated in human clinical trials in AIDS lymphoma patients. In this patient setting, chemotherapy would not only kill malignant cells, but would also increase the number of MGMTP140K-expressing HIV-resistant cells. This approach should allow for high levels of HIV-protected cells in AIDS patients to evaluate AIDS gene therapy.