We develop a natural selection model for sex ratio control in a spatially variable environment. Predictions of sex ratio alteration as a function of environmental change are tested in laboratory experiments with two parasitic wasps. Field data from a variety of other organisms also support the model. Finally, we discuss possibilities and difficulties for testing this type of evolutionary model.