BACKGROUND Infant immunization against hepatitis B began in Uganda in 2002. OBJECTIVE To determine the baseline prevalence of hepatitis B virus (HBV) infection and explore risk factors. METHODS A hepatitis B prevalence study was nested in the 2005 national HIV/AIDS serobehavioural survey. Demographic characteristics and risk factors were explored by questionnaire. One third of blood specimens (n=5875) from adults aged 15 to 59 years were tested for hepatitis B core antibodies (HBcAb); positive specimens were tested for hepatitis B surface antigen (HBsAg). RESULTS HBcAb was present in 52.3% (95% CI: 51.0-53.6) of adults, and HBsAg in 10.3% (9.5-11.1). By 15-19 years of age, 40.0% had been infected with HBV. Prevalence of both markers was significantly higher across northern Uganda, in rural areas, among the poor and least educated, and in uncircumcised men. Other independent predictors of infection were age, ethnic group, occupation, number of sex partners, and HIV and HSV-2 status. CONCLUSION Hepatitis B virus infection is highly endemic in Uganda, with transmission occurring in childhood and adulthood. More than 1.4 million adults are chronically infected and some communities disproportionately affected. The hepatitis B infant immunization programme should be sustained and catch-up vaccination considered for older children.