Sliding hiatal hernia has long term been implicated as a cause of lower esophageal sphincter (LES) incompetence and gastroesophageal reflux. The physics of LES function in hiatal hernia were investigated in in vitro and in vivo experiments. In vitro models of sliding hernias were constructed from excised canine gastroesophageal specimens. A "sphincter" was simulated with a rubber band around the gastroesophageal junction. It was found that placement of a ligature "hernia ring" on the stomach increased the opening pressure of the model sphincter. Addition of a tissue "hernia sac" sutured to the esophagus above the sphincter further increased the opening pressure, the protective effect being related to the pressure transmitted from the stomach to the hernia sac. There was no fluid leakage from the hernia sac between the hernia ring and the stomach. In anesthetized dogs (in vivo model) gastric and esophageal pressures were measured during gastric infusion while the LES gas way to reflux. A ligature tied loosely around the stomach to simulate a "hernia ring" and a sliding hernia without a hernia sac increased both the opening and the closing pressures of the LES by 36 +/- 18% and 35 +/- 20% (mean +/- SD), respectively. The opening pressure was increased by a decrease in gastric wall tension at the gastroesophageal junction, which was caused by the decreased radius of the herniated portion of the stomach. Pressure transmitted from the stomach to the hernia sac added to the LES pressure, and thereby further increased the opening pressure of the sphincter. The results explain how gastroesophageal reflux may be prevented in patients with hiatal hernia. It was recognized that the hernia sac may protect the sphincter, provided that it inserts into the esophagus above the LES.