The aim of the study was to discover if the prevalence of serological markers of hepatitis B virus infection among men who have sex with men (MSM) who attended a sexually transmitted infections clinic in Edinburgh, Scotland had changed in a 15-year period. This was a retrospective study of 3334 MSM attending the clinic as new patients. Forty-four men (1%) had hepatitis B surface antigenaemia. Overall, sera from 398 (12%) men gave positive results for anti-HBc. The seroprevalence of HBV in men aged 25-34 years and older men declined significantly during the study period. There was no significant change in seropositivity for anti-HBc in men aged 16-24 years. The proportion of men who had been vaccinated previously rose significantly during the most recent three-year period. Although there has been a decline in the prevalence of infection in clinic attendees, there is continued transmission of HBV in the local community.