In industrialized countries enterotoxigenic Escherichia coli (ETEC) is mainly diagnosed as a cause of travellers' diarrhoea, but it is also known to cause foodborne outbreaks. We report an outbreak of acute gastroenteritis caused by ETEC serotypes O92:H− and O153:H2 as well as Salmonella Anatum, which affected around 200 students and teachers after a high-school dinner in Greater Copenhagen, Denmark, November 2006. A retrospective cohort study showed that consumption of pasta salad with pesto was associated with an increased risk of illness (attack rate 59·4%; risk ratio 2·6, 95% confidence interval 1·2–5·7). Imported fresh basil used for preparation of the pesto was the most likely source of contamination. Although ETEC is associated with travellers' diarrhoea in Denmark, this outbreak suggests that a proportion of sporadic ETEC infections might be caused by contaminated imported foodstuffs. To improve food safety further, it is important to target this poorly regulated and researched area.