We examined the attack of a potentially invasive tropical insect on a non-optimal temperate zone host and tested the hypothesis that variation in plant secondary metabolites and/or locally-grown host plant cultivars could shape agroecosystem resilience in a region undergoing climatic change. We studied the phytophagous fruit fly Anastrepha ludens (Diptera: Tephritidae) and 18 apple cultivars most of which vary significantly in total content of phenolic compounds. High content of phenolic compounds significantly increased egg or larval mortality whereas cultivars exhibiting low content were severely infested. Intermediate concentrations resulted in pupal malformation and delayed immature development. These results provide a valuable insight into biotic factors that contribute to environmental resilience to an invasive species that could expand its geographical range in response to global climate change. They also highlight the importance of protecting ancestral or locally-grown apple cultivars as sources of genes for breeding programs directed at restoring the ability of crops to defend themselves against emerging pests or to cope with changing environmental conditions.