Citrobacter rodentium infection is a murine model for pathogenic intestinal Escherichia coli infection. C. rodentium infection causes an initial decrease in mucus layer thickness, followed by an increase during clearance. We aimed to identify the cause of these changes and to utilize this naturally occurring mucus stimulus to decrease pathogen impact and inflammation. We identified that mucin production and speed of transport from Golgi to secretory vesicles at the apical surface increased concomitantly with increased mucus thickness. Of the cytokines differentially expressed during increased mucus thickness, IFN-γ and TNF-α decreased the mucin production and transport speed, whereas IL-4, IL-13, C. rodentium and E. coli enhanced these aspects. IFN-γ and TNF-α treatment in combination with C. rodentium and pathogenic E. coli infection negatively affected mucus parameters in vitro, which was relieved by IL-4 treatment. The effect of IL-4 was more pronounced than that of IL-13, and in wild type mice, only IL-4 was present. Increased expression of Il-4, Il-4-receptor α, Stat6 and Spdef during clearance indicate that this pathway contributes to the increase in mucin production. In vivo IL-4 administration initiated 10 days after infection increased mucus thickness and quality and decreased colitis and pathogen contact with the epithelium. Thus, during clearance of infection, the concomitant increase in IL-4 protects and maintains goblet cell function against the increasing levels of TNF-α and IFN-γ. Furthermore, IL-4 affects intestinal mucus production, pathogen contact with the epithelium and colitis. IL-4 treatment may thus have therapeutic benefits for mucosal healing.