Hepatitis B virus (HBV) has a low endemicity in Rio de Janeiro, Brazil. Sexual transmission must play an important role in this virus, but the prevalence and risk factors have never been properly investigated. The aim of this paper is to determine the prevalence and risk factors for HBV infection in patients attending a Sexually Transmitted Diseases Clinic of the Universidade Federal Fluminense, from the State of Rio de Janeiro, Brazil. In a retrospective study, HBV seroprevalence was investigated in 440 patients. Serum of each patient was assayed for antibodies against hepatitis B core antigen (anti-HBc), hepatitis B surface antigen (HBsAg) and antibodies against hepatitis B surface antigen (anti-HBs). Demographic and risk factor data were extracted from clinic notes. The overall seroprevalence of exposure markers for HBV (anti-HBc, HBsAg and anti-HBs) were 13%, 3.4% and 8.5% respectively. Homo/bisexual behaviour, anal intercourse, HIV infection, positive serology for syphilis and blood transfusion were predictors of the HBV exposure. Among demographic data, age and place of birth were associated with the anti-HBc seropositivity.