We have identified a Dictyostelium gene, Wariai (Wri), that encodes a protein with a homeobox and seven ankyrin repeats; both domains are required for function. A null mutation results in a more than doubling of the size of the prestalk O (pstO) compartment, one of the anterior prestalk compartments lying along the anterior-posterior axis of the migrating slug. There is a concomitant decrease in the more posterior prespore domain and no change in the more anterior prestalk A (pstA) and prestalk AB (pstAB) domains. wri null cells also have a morphological defect consistent with an increase in the pstO cell population. Wri itself is preferentially expressed in the pstA but not the pstO compartment, raising the possibility that Wri regulation of pstO compartment size is nonautonomous. Analysis of chimeric organisms is consistent with this model. Development in Dictyostelium is highly regulative, with cells within the prestalk and prespore populations being able to transdifferentiate into other cells to maintain proper cell-type proportioning. Our results suggest that Wri controls cell-type proportioning, possibly by functioning as a negative regulator of a pathway mediating pstO cell differentiation and controlling the mechanism of homeostasis regulating the size of one or more of the cell-type compartments. Our results also suggest that homeobox gene regulation of anterior-posterior axis patterning may have evolved prior to the evolution of metazoans.