Indirect defences involve the protection of a host organism by a mutualistic partner. Threat of predation to the host organism may induce the production of rewards and/or signals that attract the mutualistic partner. In laboratory and field experiments we show that threatened lycaenid butterfly larvae (Plebejus acmon) produce more nectar rewards from their gland and were tended by protective ants twice as much as controls. Ant attendance did not affect the leaf consumption or feeding behaviour of larvae in the absence of predators. Inducible nectar production and indirect defence in this system may be a mechanism by which larvae provide rewards for services when they are needed the most. Such a system may stabilize the mutualistic association between lycaenid larvae and ants by preventing exploitation by either partner.