The fungus, which lives inside the leaves, not only increases the production of defensive substances in the trees, but also produces an alkaloid itself that protects the trees from feeding damage.