The endodermal lining of the adult gastro-intestinal tract harbours stem cells that are responsible for the day-to-day regeneration of the epithelium. Stem cells residing in the pyloric glands of the stomach and in the small intestinal crypts differ in their differentiation programme and in the gene repertoire that they express. Both types of stem cells have been shown to grow from single cells into 3D structures (organoids) in vitro. We show that single adult Lgr5-positive stem cells, isolated from small intestinal organoids, require Cdx2 to maintain their intestinal identity and are converted cell-autonomously into pyloric stem cells in the absence of this transcription factor. Clonal descendants of Cdx2(null) small intestinal stem cells enter the gastric differentiation program instead of producing intestinal derivatives. We show that the intestinal genetic programme is critically dependent on the single transcription factor encoding gene Cdx2.