The presence of maggots of the fly Beckeriellaniger (Ephydridae) in nests of six syntopic South American leptodactyline frogs is reported. The number of tadpoles of Physalaemus cuvieri leaving infested and non-infested nests were compared, and behavioural plasticity at the time of nest departure in the presence and absence of maggots was tested for. Maggots were found in nests of all species with exposed foam nests (four Physalaemus and two Leptodactylus species). The maggots remained in the nests of P. cuvieri for up to 3 days; adults emerged from pupae after 7 days. While in the nests the maggots consumed eggs, embryos, and tadpoles. The levels of infestation increased from the beginning to the middle of the rainy season. Mortality caused by the maggots represented an important source of mortality (mean 74%) of eggs and embryos of P. cuvieri, and probably, of the other species. The time of emergence from nests by the tadpoles of P. cuvieri was shorter (up to 21 h earlier) in infested nests. The tadpoles that left the infested nests were at the same, or a less-developed stage than tadpoles in non-infested nests. The variation in the degree of infestation, with lower values at the beginning and the increase to the middle of the rainy season, suggests that the flies may be an obligatory predator on foam nests. For tadpoles of P. cuvieri, entering the water at a later developmental stage may be important to avoid aquatic predators. Conversely, leaving infested nests at the earliest possible stage may represent a strategy to avoid maggot predation. The longer time before emergence of tadpoles of P. cuvieri from non-infested nests corroborates the hypothesis that, among leptodactyline frogs, the foam nest is a predator avoidance adaptation in the aquatic media.