To analyze the incidence and risk factors (RF) of nosocomial infection (NI) in a paediatric teaching hospital, a retrospective cohort study was conducted in Salvador, Brazil. The Centres for Disease Control and Prevention definitions were used. The detection of the rotavirus antigen in stool was performed using a rapid latex agglutination test. The study group comprised 2978 admissions that accounted for 32,924 patient-days. The incidence of NI was 8.3/1000 patient-days and 9.2/100 admissions. Of the 274 NI episodes, the most common illness and causative agent were gastroenteritis (125; 45.6%) and rotavirus (59; 21.5%), respectively. The RF for rotavirus NI was young age (10+/-8 months vs. 27+/-33 months; mean difference 17 months, 95% CI 15-20 months, p < 0.001). The temporal distribution of community-acquired and NI rotavirus showed similar trends. The universal use of rotavirus vaccine is a potential tool to control NI among children.