The prevalence and severity of gastric ulcers were investigated in a sample of 50 slaughter pigs from each of 16 commercial farms in the UK. The mean prevalence of ulcers was 19·1 per cent and the mean (se) severity score on the 16 farms was 2·2 (0·15) on a scale from 0 (normal) to 6 (severe). Multivariate regression analysis showed that the type of lying surface provided for the pigs during the finishing phase was the most important factor associated with the occurrence of gastric ulcers in the farms studied. Finisher pigs housed on slatted floors had a significantly higher mean ulcer severity score (P<0·001) than pigs housed on solid concrete floors, which had a significantly higher score (P<0·01) than pigs housed on straw bedding. Feeding a pelleted finisher ration was also associated with significant increase in ulcer severity (P<0·01) compared with feeding an unpelleted ration, but was of less importance than the type of floor. The detrimental influence of feeding pellets was ameliorated by the provision of straw bedding.