Early age at infection with Hepatitis B virus (HBV) increases the risk of chronic infection. Moreover, early HBV infection may further independently increase the risk of hepatocellular carcinoma (HCC) beyond its effect on chronicity. The distribution of birth order, a proxy for mode and timing of HBV transmission, was compared in The Gambia between hepatitis B surface antigen (HBsAg)-positive HCC cases recruited from hospitals (n = 72) and two HBsAg-positive control groups without HCC: population-based controls from a community HBV screening (n = 392) and hospital-based controls (n = 63). HCC risk decreased with increasing birth order in the population-based case-control analysis. Using first birth order as the reference, the odds ratios were 0.52 (95% CI: 0.20-1.36), 0.52 (0.17-1.56), 0.57 (0.16-2.05) and 0.14 (0.03-0.64) for second, third, fourth and greater than fourth birth order respectively (P = 0.01). A similar inverse association was observed in the hospital-based case-control comparison (P = 0.04). Compared to controls, HCC cases had earlier birth order, a proxy for young maternal age and maternal HBV viraemia at birth. This finding suggests that in chronic HBV carriers perinatal mother-to-infant transmission may increase HCC risk more than horizontal transmission. Providing HBV vaccine within 24 h of birth to interrupt perinatal transmission might reduce the incidence of HCC in The Gambia.