Acute HIV infection is characterized by massive loss of CD4 T cells from the gastrointestinal (GI) tract. Th17 cells are critical in the defense against microbes, particularly at mucosal surfaces. Here we analyzed Th17 cells in the blood, Gl tract, and broncheoalveolar lavage of HIV-infected and uninfected humans, and SIV-infected and uninfected sooty mangabeys. We found that (1) human Th17 cells are specific for extracellular bacterial and fungal antigens, but not common viral antigens; (2)Th17 cells are infected by HIV in vivo, but not preferentially so; (3) CD4 T cells in blood of HIV-infected patients are skewed away from a Th17 phenotype toward a Th1 phenotype with cellular maturation; (4) there is significant loss of Th17 cells in the Gl tract of HIV-infected patients; (5) Th17 cells are not preferentially lost from the broncheoalveolar lavage of HIV-infected patients; and (6) SIV-infected sooty mangabeys maintain healthy frequencies of Th17 cells in the blood and Gl tract. These observations further elucidate the immunodeficiency of HIV disease and may provide a mechanistic basis for the mucosal barrier breakdown that characterizes HIV infection. Finally, these data may help account for the nonprogressive nature of nonpathogenic SIV infection in sooty mangabeys.