Preceding viral infections have mostly been described in autoimmune hepatitis (AIH) in single cases. We aimed to identify viral infections that potentially trigger AIH, as suggested for hepatitis E virus (HEV) infections. Therefore, antibodies against hepatitis A (HAV), B, C and E viruses; hepatotropic herpesviruses; and parvovirus B19 (PVB19) were analyzed retrospectively in 219 AIH patients at diagnosis, 356 patients with other liver diseases and 89 children from our center. Untreated adult AIH (aAIH) patients showed higher anti-HEV seroprevalences at diagnosis than patients with other liver diseases. Untreated aAIH patients had no increased incidence of previous hepatitis A, B or C. Antibodies against hepatotropic herpesviruses in untreated AIH were in the range published for the normal population. Untreated pediatric AIH (pAIH) patients had evidence of more previous HAV and PVB19 infections than local age-matched controls. The genetic AIH risk factor HLA DRB1*03:01 was more frequent in younger patients, and DRB1*04:01 was more frequent in middle-aged patients without an obvious link to virus seropositivities. Pediatric and adult AIH seem to be distinct in terms of genetic risk factors and preceding viral infections. While associations cannot prove causal relations, the results suggest that hepatotropic virus infections could be involved in AIH pathogenesis.