Entomophagous insects are often repelled by the secondary compounds of the plants eaten by their prey. These compounds, therefore, take on a defensive role for the phytophagous species that sequester them. Given that numerous entomophagous species are capable of learning, the effects on the foraging behavior of a repeated experience were investigated in the predatory ant Myrmica rubra. The sulfur amino acids methyl-cysteine sulfoxide (MCSO) and propyl-cysteine sulfoxide (PCSO) produced by Allium plants were identified in caterpillars of the leek moth Acrolepiopsis assectella. Three behavioral studies were carried out, with or without prior familiarization with caterpillars reared either on leek or on an artificial diet containing no Allium compounds. In choice tests with the two types of caterpillars, unfamiliarized ants displayed a preference for caterpillars reared on the artificial diet, but this preference disappeared or was reversed in both young and old ants after familiarization.