Hematemesis is the vomiting of blood.
The most common cause of upper GI bleeding is an ulcer in the stomach or small intestine. Another common cause of bleeding is liver disease. When the liver has scars from cirrhosis, the veins around the esophagus become swollen, like varicose veins of the legs. They may bleed suddenly for no apparent reason or they may begin to bleed after coughing or vomiting. Sometimes the esophagus bleeds because it is torn.