Summary. Diabetes mellitus has been reported to have an increased prevalence and to be associated with more severe fibrosis in patients with chronic hepatitis C. We evaluated the prevalence of diabetes mellitus in patients with chronic hepatitis B or C as well as the possible association between presence of diabetes and extent of liver fibrosis. In total, 434 consecutive patients with histologically documented hepatitis B e antigen (HBeAg)-negative chronic hepatitis B (n = 174) or chronic hepatitis C (n = 260) were studied. The relationships of diabetes and epidemiological, somatomorphic, laboratory and histological patient characteristics were evaluated. Liver histological lesions were blindly evaluated according to the Ishak's classification. Diabetes was present in 58 (13%) patients, without any difference between those with chronic hepatitis B (14%) or C (13%). Diabetes was observed significantly less frequently in patients with fibrosis score 0–2 (7.7%) than 3–4 (10.4%) than 5–6 (29.2%) (P < 0.001). The presence of diabetes was independently associated with higher gamma-glutamyl-transpeptidase (GGT) levels and more severe fibrosis or presence of cirrhosis (P < 0.001) as well as with presence of hepatic steatosis and increased serum triglycerides levels (P < 0.02). In the noncirrhotic patients, diabetes was significantly associated with older age and higher GGT levels, but not with the extent of fibrosis. In conclusion, diabetes mellitus is observed in more than 10% of patients with either HBeAg-negative chronic hepatitis B or chronic hepatitis C. The presence of diabetes is strongly associated with more severe liver fibrosis, but such an association may be related to the high prevalence of diabetes in patients with cirrhosis.