Male animals often have reduced immune function compared to females but the proximate mechanisms underlying this taxonomically widespread pattern are unclear. Because immune function is resource-dependent and sexes may differ in foraging behaviour, we hypothesized that sexual dimorphism in immune function may arise from differential nutrient intake (acquisition hypothesis). To test this hypothesis, we examined the relationship between nutrient consumption and patterns of phenoloxidase (PO) activity, a key component of insect immune systems, in Queensland fruit flies. In the first experiment, flies were allowed to consume their preferred nutrient intake. In the second experiment, we restricted flies to one of 12 diets varying in protein and ...