One aspect of the invention relates to an animal feed composition comprising 0.05-8.0 wt.% of encapsulated GDL. The inventors have discovered that the incidence of diarrhea in neonatal calves or piglets can be reduced significantly by including encapsulated glucono delta-lactone (GDL) in animal feed for neonata calves or piglets, such as calf milk replacers or sow milk replacers, respectively. The present invention also relates to the therapeutic or prophylactic treatment of diarrhea in calves or piglets using the aforementioned animal feed composition.