Secretin is a peptide hormone that regulates water homeostasis throughout the body, and influences the environment of the duodenum by regulating secretions in the stomach and pancreas. Secretin is produced in the S cells of the duodenum, which are located in the crypts of Lieberkühn. In humans, the secretin peptide is encoded by the SCT gene. Secretin was the first hormone to be identified. Secretin also helps regulate the pH of the duodenum by: inhibiting the secretion of gastric acid from the parietal cells of the stomach; and stimulating the production of bicarbonate from the centroacinar cells and intercalated ducts of the pancreas. In 2007, secretin was discovered to play a role in osmoregulation by acting on the hypothalamus, pituitary, and kidney.