Résumé: Reproduction and recruitment of benthic invertebrates are influenced by the climate and by the ecological structure of marine ecosystems, along with local anthropogenic pressures such as eutrophication or oligotrophication. Using the Pacific oyster Crassostrea gigas as a biological model, we tested the hypothesis that the variability in prodissoconch II (PII) size (i.e. size at metamorphosis) depends on ecological functioning. Settlement and recruitment were assessed at 5 sampling sites on the French Mediterranean shellfish farmed Thau lagoon during the main summer recruitment events in 3 consecutive years (2012-2014). Hydrobiological and planktonic analyses were conducted at 3 sampling sites. Our results showed that recruitment was extremely heterogeneous, ranging from 0 to 260 ± 27 SE ind. dm-2 throughout the ecosystem and was linked with variability in PII size, which ranged from 180 to 296 µm. The annual temporal pattern of PII sizes appeared to be controlled by temperature during the settlement period, whereas the spatial pattern depended on phytoplankton biomass and on the trophic functioning of the ecosystem. Smaller PII sizes were significantly correlated with the highest phytoplankton biomass, while larger PII sizes were positively correlated with mixotrophic cryptophyte abundance. We found an inverse relationship between PII size and survival after metamorphosis, showing that recruitment success was associated with smaller PII sizes. Regional climate conditions and local trophic functioning appear to be key factors in metamorphosis and consequently contribute to recruitment heterogeneity. Further studies should be performed in other ecosystems following an oligotrophication trajectory to generalize this result.