Hepatitis B prevalence, risk factors, infection awareness and disease knowledge among inmates: a cross-sectional study in Switzerland's largest pre-trial prison Background Hepatitis B virus (HBV) is a major health concern in prison, but data are scarce in European prisons. This study aims to measure the prevalence of HBV infection, risk factors, awareness about infection, and HBV knowledge among inmates in Switzerland' s largest pre-trial prison. Methods Serological blood tests (HBsAg, anti-HBs, and anti-HBc) and a standardized socio-demographic and sexual health survey were offered to consenting prisoners in 2009 and 2011. HBV knowledge was assessed using a standardized questionnaire among participants recruited in 2009. Findings A total of 273 male participants were included in the study (116 participants answered the HBV knowledge survey), with 38.1% originating from Eastern Europe, 28.2% from sub-Saharan Africa, 14.3% from North Africa, and 9.5% from Latin America. The prevalence of anti-HBc (resolved/chronic infection) was 38.2% and the prevalence of HBsAg (chronic infection) was 5.9%; 14% of participants had vaccine-acquired immunity (anti-HBs positive/anti-HBc negative). We estimated that 15.5% of people living in Geneva having chronic infection go through the Geneva' s prison. Region of origin was significantly associated with chronic/resolved HBV infection (P < 0.001): 72.2% of participants from sub-Saharan African, 34.6% from Eastern Europe and 13.2% from other regions. In terms of chronic infection, 15.6% of participants from sub-Saharan Africa were positive for HBsAg, vs 2% of those from other regions (P < 0.001). In stratified analyses, region of origin remained significantly associated with HBV infection. Among those with chronic infection, only 12.5% were aware of their status. A minority of inmates knew how HBV could be transmitted. Conclusions The primary factor associated with HBV infection in this study was the geographical region of origin of participants. Given the high HBV prevalence found in this prison population, a targeted testing and vaccination approach based on prisoners' region of origin would be a cost-effective strategy when resources are limited. Additionally, identification of at-risk people should not rely on sensitive questions nor self-reported history of HBV. An inclusive approach to global health needs to incorporate prison population, as incarcerated people have a disproportionate burden of HBV infection and because an important proportion of hard-to-reach chronic HBV infected people go through the incarceration system. Electronic supplementary material: The online version of this article contains supplementary material.