Some causes of both black stool and stomach pain are gastritis and bleeding peptic ulcers, according to MedlinePlus, Mayo Clinic and WebMD. Gastritis occurs when the lining of the stomach is eroded, irritated or inflamed, explains WebMD.
Other symptoms of gastritis include nausea and vomiting, a constantly upset stomach, bloating and indigestion, says WebMD. The patient may also feel a burning sensation between meals or at bedtime. He may also vomit material that looks like coffee grounds. This, like a tarry black stool, is a sign of digested blood.
Helicobacter pylori infections, other bacteria and viruses, pernicious anemia and reflux of bile into the patient's stomach can all cause gastritis, notes WebMD. It can also be caused by alcohol abuse, medications such as aspirin, and chronic vomiting or stress.
Peptic ulcers are sores found in the lining of the stomach, the esophagus or the duodenum, which is the end of the stomach and the beginning of the small intestine, explains Mayo Clinic. The main symptom is an incessant, burning pain that is exacerbated when the sore is washed with stomach acid and worse when the stomach is empty. It often flares up at night and can be eased by taking antacids or eating foods that protect the ulcer from stomach acid.