Loperamide hydrochloride (4 mg t.d.s.) was compared with codeine phosphate (60 mg t.d.s.) in a double blind crossover study of patients with loose output from their ileostomies. Both drugs significantly decreased the daily output and water content of ileostomy fluid. Daily losses of sodium and potassium were less when the patients were treated with loperamide. Loperamide was also associated with less side effects. It is concluded that loperamide hydrochloride was more effective in the treatment of ileostomy diarrhoea than codeine phosphate. In this group of patients those with the highest outputs from their ileostomies benefited most from this treatment.