Peptic ulcer is associated with low socioeconomic status. In this study we used longitudinal population-based data to investigate factors other than Helicobacter pylori that might contribute to this association. Of 4597 Alameda County Study participants, 104 developed ulcers between 1965 and 1974. We examined the impact of baseline risk factors on the association between education and incident ulcer. Among women, high school dropouts had a higher risk of incident ulcer than those who attended college (age-adjusted odds ratio [OR], 3.3; 95% confidence interval [CI], 1.5, 7.3). Adjustment for smoking, alcohol, lack of sleep, skipping breakfast, chronic pain, and liver disease eliminated 21.7% of this excess risk, whereas adjustment for psychological characteristics and life stress eliminated 56.5% of the risk; adjusted for all risk factors, the OR was 1.9. Among men, the risk associated with low education was weaker (OR, 1.9; 95% CI, 0.9, 3.9). Health risk behaviors and poor health had a greater impact (55.5% drop in excess risk with adjustment) and psychosocial factors a lesser impact (33.3% drop) in men than in women. Adjustment for heavy on-the-job labor decreased the risk by 77.8%, whereas the fully adjusted OR was 1.0. We conclude that psychological stress, health risk behaviors, analgesic use, and hard physical labor may contribute to the increased risk of ulcer in low socioeconomic populations.