Abstract Mediterranean fruit fly Ceratitis capitata (Diptera: Tephritidae) larvae are capable of developing in one of many hosts that may vary greatly in quality. We hypothesized that they will respond to the larval environment in a manner beneficial to their subsequent reproductive performance. Accordingly, we investigated the effects of various larval diets (varying in the amount of protein and sugar they contain) on the size, development time, nutritional status and reproductive maturation (ovarian development and onset of sexual behaviour) of females and males. We found that flies which undergo larval development in artificial host fruit that contain sugar and protein (‘protein-fed’) were larger, developed faster and emerged with more nutritional reserves than flies that were protein-deprived as larvae. Protein-fed males, regardless of their size, became sexually active before males that developed in hosts with no protein. Protein-fed females produced more mature eggs than protein-deprived ones. Moreover, protein-fed females tended to copulate sooner than females that developed in hosts with no protein. In addition, regardless of female larval diet, females with more mature eggs tended to copulate sooner than females with less mature eggs. In light of these results, the importance of the larval environment for adult reproductive success is discussed.