Using a water treatment technique that extends the larval period of flesh flies, we investigated the effect of photoperiodic exposure on the alteration of the pupal diapause program and regulation of larval duration in the flesh fly Sarcophaga similis Meade (Diptera: Sarcophagidae). Exposure to only 4 cycles of long days successfully altered the developmental program from diapause to nondiapause, and short days altered the nondiapause developmental program to a diapause program. Larvae recognized all photoperiods of 14L10D, 15L9D, and 16L8D as long days, but their diapause-averting effects were different, i.e., 16L8D showed the strongest effect, 14L10D showed the weakest, and 15L9D showed an intermediate effect. These results indicate that larvae can discriminate long days quantitatively. S. similis also showed a clear photoperiodic response in the larval stage, i.e., larvae reared under short-day conditions pupariated later than those reared under long-day conditions. When diapause-destined larvae were exposed to 3 cycles of long days, some larvae altered their developmental program from diapause to nondiapause and pupariated significantly earlier than individuals destined to diapause.