Objective 1) To compare sociodemographic characteristics, Internet use to seek sexual partners, and sexual behavior in two samples of men who have sex with men: one sample that was surveyed on-line and another that was interviewed in gay venues. 2) To determine the variables associated with unprotected anal intercourse with sexual partners met on-line. Methods For 1 month, 804 men who have sex with men completed a pen-and-paper survey in gay venues and 1,240 completed a web survey in Madrid, Barcelona and Bilbao/San Sebastián (Spain). Results The sociodemographic characteristics differed in the two samples. Compared with men who have sex with men surveyed off-line, a higher proportion of those surveyed on-line used the Internet to meet sexual partners (81% vs. 65%, p<0.05), had unprotected anal intercourse with sexual partners met on-line (31% vs. 27%, p>0.05), had intentionally practised unprotected anal intercourse (81% vs. 65%, p<0.05), did not know their HIV status (35% vs. 28%, p<0.05), used drugs when they practised unprotected anal intercourse (68% vs. 55%, p<0.05) and had had a sexually transmitted infection in the previous year (24% vs. 20%, p<0.05). In the multivariate analysis, unprotected anal intercourse with sexual partners met on-line was associated with having more than 20 sexual partners (odds ratio [OR]: 1.528; 95% confidence interval [95%CI]: 1.024–2.282; p=0.038), using drugs before/during sexual relations (OR: 1.962; 95% CI: 1.478–2.604; p=0.000), having had a sexually transmitted infection in the previous year (OR: 2.042; 95% CI: 1.535–2.716; p=0.000) and being HIV-positive (OR: 2.124; 95% CI: 1.355–3.330; p=0.001), amongst other factors. Conclusions Although the prevalence of unprotected anal intercourse was similar in the two samples, certain variables could explain why the men who have sex with men surveyed on-line had a greater risk of sexually transmitted infections than those surveyed off-line.