The aim of this study was to investigate the effects of tumour and patient characteristics on trends in the survival of patients with cancer of the anus or rectum in England and Wales. A total of 132,542 adults (15-99 years) who were diagnosed during the 14 years 1986-1999 were followed up to 2001 through the National Health Service Central Register. Relative survival up to 5 years after diagnosis was estimated, using deprivation-specific life tables. Generalised linear models were used to estimate relative excess risks of death, adjusted for patient and tumour characteristics. The results showed that 5-year relative survival was higher in women, younger patients and more affluent patients, and higher for anal cancer than rectal cancer. Survival improved by more than 10% from the late 1980s (around 38%) to the late 1990s (49%). This trend was not explained by changes in the distribution of age, anatomical site, morphology or deprivation. The trend was more marked in younger and more affluent patients, and for adenocarcinoma and epidermoid carcinoma than for tumours with other morphology. The inequality in survival between affluent and deprived patients widened. It is concluded that improvements in survival may reflect improvements in disease stage, diagnostic technique or treatment. Which of these factors contribute to the widening socioeconomic inequalities in survival remains to be elucidated.