Broadly, esophageal spasm can be divided into 2 major variants that are distinct entities: (1) diffuse esophageal spasm and (2) hypertensive peristalsis. Esophageal spasms are painful contractions within the muscular tube connecting your mouth and stomach (esophagus). It feels like sudden, severe chest pain that lasts from a few minutes to hours. Esophageal spasms typically occur only occasionally and might not need treatment. But sometimes the spasms are frequent and can prevent food and liquids from traveling through the esophagus. These spasms interfere with your ability to eat or drink, treatments are available.