Males 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 have different nutritional requirements, we hypothesized that sexual dimorphism in immune function may arise from differential nutrient intake (acquisition hypothesis). To test this hypothesis, we examined patterns of phenoloxidase (PO) activity in relation to nutrient consumption in Queensland fruit flies (Q-flies). In the first experiment, flies were allowed to choose their preferred nutrient intake. Compared with males, female Q-flies had higher PO activity, consumed more calories, and preferred a higher protein:carbohydrate (P:C...