When Dictyostelium cells are induced to develop between a coverslip and a layer of agarose, they aggregate normally into groups containing up to a thousand cells but are then constrained to form disks only a few cells thick that appear to be equivalent to the three-dimensional mounds formed on top of agarose. Such vertically restricted aggregates frequently develop into elongated motile structures, the flattened equivalent of three-dimensional slugs. The advantage of using this system is that the restricted z-dimension enables direct microscopic visualization of most of the cells in the developing structure. We have used time lapse digital fluorescence microscopy of Dictyostelium strains expressing green fluorescent protein (GFP) under the control of either prestalk or prespore specific promoters to follow cell sorting in these flattened mounds. We find that prestalk and prespore cells expressing GFP arise randomly in early aggregates and then rotate rapidly around the disk mixed with the other cell type. After a few hours, the cell types sort out by a process which involves striking changes in relative cell movement. Once sorted, the cell types move independently of each other showing very little heterotypic adhesion. When a group of prestalk cells reaches the edge of the disk, it moves out and is followed by the prespore cell mass. We suggest that sorting may result from cell type specific changes in adhesion and the consequent disruption of movement in the files of cells that are held together by end-to-end adhesion.