Background/aims: We aimed to determine the etiology of patients with duodenal and gastric ulcers. Methods: 140 patients diagnosed with peptic ulcer between April 2002-2009 were enrolled in this prospective study. Two biopsy specimens were collected from the antrum and corpus for histology and one for rapid urease testing, and stool samples were analyzed for Helicobacter pylori antigen. Serum calcium and gastrin levels were also analyzed. Results: 82 (58%) patients were male, with a median age of 47.70 +/- 15.03 years (range: 16-92). The ulcer was located in the duodenum in 96 patients, stomach in 40, and both duodenum and stomach in 4. The rates of patients positive for Helicobacter pylori antigen in stool, positive in urease testing and positive for Helicobacter pylori presence in antral and corpus samples were 48%, 52%, 67%, and 60%, respectively. 107 (76%) patients were positive for Helicobacter pylori in one of the test methods. 64 (46%) patients had a history of nonsteroidal antiinflammatory drug use within the last month. Mean levels of calcium and gastrin were 9.29 +/- 0.40 (7.90-10.20) and 73.96 +/- 89.88 (12.86-562.50), respectively. Gastrin level was correlated to inflammatory activity (p<0.05). 19 (13.6%) of the patients were negative for Helicobacter pylori, nonsteroidal antiinflammatory drug use and hypersecretory illness, and were classified as idiopathic. Conclusions: The most common cause of duodenal and gastric ulcer was Helicobacter pylori, and it was responsible for three-fourths of the cases. About half of the patients had a history of nonsteroidal antiinflammatory drug use, and nonsteroidal antiinflammatory drug and Helicobacter pylori were both responsible for the ulcer in three-fourths of these patients. In about one-tenth of the patients, nonsteroidal antiinflammatory drug use was the cause of ulcer alone, and about one-tenth of the ulcers were classified as idiopathic.