The medical term for black, tarry stool caused by digested blood—often from upper gastrointestinal bleeding—is melena. The stool is typically sticky, dark, and unusually foul-smelling because digestive enzymes and intestinal bacteria break down hemoglobin as blood passes through the gut.
Melena commonly results from bleeding in the esophagus, stomach, or duodenum. Peptic ulcers are a frequent cause, but gastritis, esophageal varices, tumors, Mallory–Weiss tears, and some medications can also produce it. A sufficiently slow bleed from farther down the digestive tract may occasionally become melena as well.
Melena should not be confused with hematemesis, which means vomiting blood, or hematochezia, which usually means passing bright-red blood through the rectum. Steatorrhea instead refers to fatty, greasy stool and is unrelated to gastrointestinal bleeding.
Not every black stool is melena. Iron supplements, bismuth-containing medicines such as Pepto-Bismol, and certain dark foods can change stool color without bleeding. Suspected melena is medically important because gastrointestinal blood loss can be severe even when the bleeding is not visibly dramatic.