We analyzed data from a large randomized HIV/HCV prevention intervention trial with young injection drug users (IDUs). Using categorical latent variable analysis, we identified distinct classes of sexual behavior for men and women. We conducted a latent transition analysis to test the effect of the intervention on transitions from higher to lower risk classes. Men who were in a high-risk class at baseline who received the intervention were 86 % more likely to be in a low-risk class at follow-up compared to those in the control group (p = 0.025). High-risk intervention participants were significantly more likely to transition to the class characterized by unprotected sex with a main partner only, while low-risk intervention participants were significantly less likely to transition to that class. No intervention effect was detected on the sexual risk behavior of women, or of men who at baseline were having unprotected sex with a main partner only.