We tested the hypothesis that mate choice is responsible for countergradient variation in the sexual coloration of Trinidadian guppies (Poecilia reticulata). The nature of the countergradient pattern is that geographical variation in the carotenoid content of the orange spots of males is counterbalanced by genetic variation in drosopterin production, resulting in a relatively uniform pigment ratio. A female hue preference could produce this pattern, because hue is the axis of colour variation most directly affected by the pigment ratio. To test this hypothesis, we crossed two populations differing in drosopterin production and produced an F(2) generation with variable drosopterin levels. When the carotenoid content of the orange spots was held constant, female guppies preferred males with intermediate drosopterin levels. This shows that females do not simply prefer males with greater orange spot pigment content; instead, the ratio of the pigments also affects male attractiveness. To our knowledge, this is the first direct evidence for a hypothesized agent of countergradient sexual selection.