Knowledge of a sex partner's HIV serostatus can influence sexual behavior and inform harm-reduction strategies. We sought to determine how often Peruvian men who have sex with men (MSM) and transgender women (TW) knew the HIV serostatus of their sex partners, if this knowledge was associated with any predictive factors or unprotected anal intercourse (UAI), and if UAI was associated with partner serostatus. We analyzed data from the 2008 Peruvian MSM Sentinel Surveillance Survey. Data were collected by CASI about each participant's three most recent male sex partners. Primary outcome was knowledge of a partner's HIV test result. Multivariate analysis assessed the effect of age, education, sexual identity, number of male partners, alcohol use during intercourse, type of partnership and length of partnership using logistic regression. 735 participants provided data on 1,643 of their most recent sex partners from the last 3 months. 179/735 (24.4%) of all participants knew HIV test results for at least one of their 3 most recent partners, corresponding to 230/1643 (14.0%) of all sexual partnerships in the last 3 months. In multivariate analysis, casual (OR: 0.27, 95% CI: 0.17-0.42) and exchange sex (OR: 0.31, 95% CI: 0.11-0.88) partners, compared to stable partners, were negatively associated with knowledge of partner serostatus, whereas relationships lasting longer than one night (<3 months OR: 2.20, 95% CI: 1.39-3.51; 3 months to 1 year OR: 3.00, 95% CI: 1.80-5.01; ≥ 1 year OR: 4.13, 95% CI: 2.40-7.10) were positively associated with knowledge of partner serostatus. Knowledge of partner serostatus was not associated with unprotected anal intercourse with that partner. Few MSM and TW in Peru know their partners' HIV serostatus. Our findings suggest that the type and length of partnership influence the likelihood of knowing a partner's serostatus. Further research should explore the contexts and practices of partner communication, their effect on sexual behavior, and interventions to promote discussion of HIV testing and serostatus as an HIV prevention strategy in this population.