**Background:** Sexual dimorphism in ecological traits such as diet, body size, and habitat use is widespread, but whether resource competition can drive its evolution has remained controversial and lacked direct experimental evidence. Darwin originally proposed an 'ecological cause' of sexual dimorphism, distinct from sexual selection. Mathematical models suggest character displacement between the sexes can evolve under competition, but unambiguous empirical tests have been lacking. In Drosophila melanogaster, male and female fitness are maximised under different protein-to-carbohydrate ratios, yet standing variation in diet preference often shows overlapping male and female preferences, suggesting ecological conditions may determine the extent of sexual dimorphism evolution.
**Methods:** The author derived experimental populations from a LHm stock population of D. melanogaster maintained for over 500 generations. Six replicate populations were established: three 'high competition' (low resource availability) populations receiving one 5 μl microcapillary tube each of 90 g/L sucrose and 90 g/L yeast solution per vial, and three 'low competition' (high resource availability) populations receiving 30 μl each of both solutions. Each vial contained 8 males and 8 females (16 flies total) on standard fly food capped with a thin agar layer to block adult access to larval food while allowing larvae to penetrate. After three generations of adaptation, offspring were reared in a common environment and individually assayed for diet preference using microcapillary tubes containing sucrose and yeast solutions. Evaporative loss was corrected using control vials without flies. Statistical analyses included linear models per population, mixed models with bootstrap uncertainty, binomial GLMs for survival, and Bayesian multiresponse mixed effects models for bivariate diet analysis.
**Key Results:** In the ancestral population, sexual dimorphism in diet was weak and not statistically significant (male sucrose:yeast − female sucrose:yeast = 0.113, SE = 0.22, bootstrapped p = 0.6). After three generations, all three high-competition populations showed elevated sexual dimorphism, with males consuming higher sucrose:yeast ratios than females (male − female = 0.356, SE = 0.108, p = 2 × 10⁻⁴). This dimorphism was statistically significant or trending in all three replicates. Low-competition populations showed weak, non-significant dimorphism similar to the ancestor (male − female = 0.109, SE = 0.143, p = 0.437). The treatment effect on sexual dimorphism was significant (linear mixed model, F₁,₄ = 25.3, p = 0.0073). Mean absolute fitness (recruitment per female) increased an order of magnitude across all populations, indicating adaptive evolution. Survival during 48h food deprivation was significantly higher in high-competition populations (GLM Z = 4.5, p < 0.0001). Bivariate analysis revealed that high-competition populations evolved elevated total resource consumption (posterior mean treatment effect = 25.9 [3.7–47 95% CI] micrograms, pMCMC = 0.034), with males evolving elevated sucrose intake and females elevated yeast intake (posterior mean trait*sex = −48 [−84 to −13 95% CI] micrograms, pMCMC = 0.014). Evolutionary rates did not differ significantly between sexes (sucrose: F₁,₁₀ = 0.96, p = 0.34; yeast: F₁,₁₀ = 1.8, p = 0.21), indicating divergence occurred in both sexes. Mean sucrose:yeast ratios ranged from 1.37 to 1.73, corresponding to carbohydrate:protein ratios of approximately 3:1–4:1.
**Clinical Implications:** This study does not have direct clinical implications as it is a fundamental evolutionary biology experiment using a model insect system. However, it provides important proof-of-concept evidence that resource competition can drive rapid evolution of ecological sexual dimorphism, supporting a long-standing hypothesis in evolutionary biology. The findings have implications for understanding how sex-specific nutritional requirements interact with ecological pressures to shape trait evolution, which may inform broader principles of adaptation and biodiversity.