The aim of this study was to determine the seroprevalence of human herpesvirus 8 (HHV-8) and the immunization status for hepatitis B virus (HBV) infection in febrile patients in two districts of the United Republic of Tanzania. Between February and March 2007, blood samples were collected in Pemba Island and Tosamaganga from 336 outpatients and sent to the Virology Laboratory in Rome (Italy) for testing. HHV-8 DNA and HBV-DNA were amplified by two in-house molecular methods, anti-HHV-8 antibody titers were determined by an immunofluorescence assay (IFA), and anti-HCV, HBsAg, anti-HBs, and anti-HBc were evaluated by microplate enzyme immunoassay (MEIA). The seroprevalence of HHV-8 was 30.7% (96/313). In Pemba Island, the prevalence was lower than in Tosamaganga (14.4% vs. 46.3%). A higher prevalence of low titers of HHV-8 IgG (<1:80, 81%) was found among those under 5 years of age. HHV-8 DNA was detected in six seropositive patients (6.7%). The prevalence of HBsAg, anti-HBs, and anti-HBc was 4.3%, 37.6%, and 29.3%, respectively. Out of 277 patients, 70 had had a previous infection (25.3%). One case of occult hepatitis was found. The cover of hepatitis B vaccination was higher among children born after 2002 (66.7%) than in patients born before 2002. HHV-8 infection is endemic in Tanzania and the seroprevalence rate was higher in the mainland than on Pemba Island. The 3.9% percentage of HBsAg in children younger than 4 years of age suggests that increased efforts are required in order to achieve universal and compulsory immunization of children against HBV.