We examined the dynamic regulation of mucus gel thickness (MGT) in vivo in rat duodenum in response to luminal acid, cyclooxygenase (COX) inhibition, and exogenous PGE(2). An in vivo microscopic technique was used to measure MGT with fluorescent microspheres in urethan-anesthetized rats. Duodenal mucosa was topically superfused with pH 7.0 or pH 2.2 solutions with or without PGE(2) and indomethacin treatments. Glycoprotein concentration of duodenal loop perfusates was measured with periodic acid/Schiff (PAS) or Alcian blue (AB) staining. MGT and perfusate glycoprotein concentration were stable during a 35-min perfusion with pH 7.0 solution. Acid exposure increased MGT and PAS- and AB-positive perfusate glycoprotein concentrations. Indomethacin pretreatment increased both PAS- and AB-positive perfusate glycoprotein at baseline; subsequent acid superfusion decreased perfusate glycoproteins and gel thickness. PGE(2) (1 mg/kg iv) simultaneously increased MGT and PAS-positive perfusate glycoprotein concentrations followed by a transient increase in AB-positive glycoprotein concentration, suggesting contributions from goblet cells and Brunner's glands. Parallel changes in MGT and perfusate glycoprotein concentration in response to luminal acid and PGE(2) suggest that rapid MGT variations reflect alterations in the balance between mucus secretion and exudation, which in turn are regulated by a COX-related pathway. Luminal acid and PGE(2) augment mucus secretion from goblet cells and Brunner's glands.