During recent decades the incidence of testicular cancer (TC) has increased rapidly around the world. Associated exogenous etiological factors might therefore be identifiable. We performed a case-control study nested within Finnish, Swedish and Icelandic maternity cohorts exploiting early pregnancy serum samples to evaluate the role of congenital or neonatal infections with Epstein-Barr virus (EBV) and cytomegalovirus (CMV) as risk factors of TC in the offspring. For each case-index mother pair, three or four matched control-control mother pairs were identified using national population registries. First trimester sera were retrieved from the index mothers of 66 TC cases and 258 matched control mothers, and were tested for antibodies to EBV and CMV. High level of maternal EBV IgG antibodies was associated with significantly increased risk of TC in the offspring (odds ratio (OR), 2.50; 95% confidence interval (CI), 1.15, 5.40), especially with risk of non-seminoma TC (OR, 2.73; 950% CI, 1.25, 5.99) and non-seminoma TC diagnosed under 8 years of age (OR, 2.72; 95% CI, 1.05, 7.04). In contrast, offspring of CMV IgG-seropositive mothers had a decreased risk of TC diagnosed under 8 years of age (OR, 0.35; 95% CI, 0.14, 0.89). Our results suggest that EBV and CMV infections may be associated with TC.