RESUMEN
Unambiguous examples of ecological causes of animal sexual dimorphism are rare. Here we present evidence for ecological causation of sexual dimorphism in the bill morphology of a hummingbird, the purple-throated carib. This hummingbird is the sole pollinator of two Heliconia species whose flowers correspond to the bills of either males or females. Each sex feeds most quickly at the flower species approximating its bill dimensions, which supports the hypothesis that floral specialization has driven the evolution of bill dimorphism. Further evidence for ecological causation of sexual dimorphism was provided by a geographic replacement of one Heliconia species by the other and the subsequent development of a floral dimorphism, with one floral morph matching the bills of males and the other of females.