Injection drug use has recently emerged in sub-Saharan Africa. The purpose of this study was to assess the factors associated with increased risk of testing HIV-positive in a sample of injection drug users (IDUs) in Dar es Salaam, Tanzania. Participants were recruited by a trained outreach worker or were referred by IDUs who had completed the study. Blood specimens and self-reported socioeconomic and behavioral data were collected from 315 male and 219 female IDUs. Data were analyzed using univariate odds ratios and multivariate logistic regression modeling. Forty-two percent of the sample tested HIV-positive. Several socioeconomic, injection, and sexual factors were found to be associated with increased odds of testing HIV-positive. Multivariate analysis showed that having had sex more than 81 times in past 30 days, earning less than 100,000 shillings (US$76) in the past month, residency in Dar es Salaam for less than 5 years, and injecting for 3 years were independently associated with the greatest risk of infection. The rate of HIV infection in this sample of IDUs was found to be very high, suggesting that injection drug use may be a factor in the continuing epidemic in sub-Saharan Africa. The factors associated with increased risk of HIV infection suggest further research is needed on the needle use and sexual networks of IDUs.