Diurnal hawkmoths, Hemaris fuciformis, and bumblebees, Bombus pasquorum, were observed foraging for nectar in flowers of Viscaria vulgaris. The hawkmoths hovered in front of the flowers, while the bees perched on them. The hawkmoths had a faster probing rate than the bees, and consequently also had higher gross and net rates of energy gain. A model is presented that shows that hovering only yields a higher net rate of energy gain (NREG) than perching when nectar volumes are high due to low competition for the resource. The difference in NREG of perchers and hoverers decreases with an increase of competition, and eventually perching yields the highest NREG. This is an effect of the higher cost of hovering. The results suggest that hovering can only evolve as a pure evolutionarily stable strategy (ESS) if competition is reduced, for example by co-evolutionary specializations with plants. The possibility that it has evolved as a mixed ESS (i.e, individuals can both hover and perch depending on the resource level) is discussed. The evolution of optimal foraging strategies is discussed, and it is pointed out that the rate of gain of an animal is independent of the strategy used when all competing foragers use the same strategy, but competitively superior strategies will nevertheless evolve because they are ESSs. Competition between strategies with different energy costs are special, because resource availability determines which strategy is competitively superior. A high-cost strategy can only evolve as a pure ESS at high resource levels, or as a mixed ESS at intermediate levels.