Phorid flies are characterized by my colleague, Henry Disney, as the most biologically diverse family of insects. With each passing year, we find more and more unusual lifestyles and larval food preferences that support this statement.
In the New World tropics, there are a huge variety of frogs found in rain forests. Many of them live in the canopy and come down to the ground level only for mating. Often they lay their eggs on leaves over water bodies, apparently to try and limit depredation by aquatic predators. This creates an opportunity for phorid flies.
My co-author, Robert Horan III, found that eggs of the gliding leaf frog, Agalychnis spurrelli, were turning a strange white color in his study on Barro Colorado Island in Panama. Further investigation showed that maggots of a small fly were eating the eggs. He reared some adults, sent them to me, and they turned out to be a new species that we named Megaselia randi. The name was a tribute to an influential herpetologist, Stan Rand, who helped Robert in his early career.
This is not the first instance of phorid flies feeding on frog eggs in Latin America. Frogs in two other genera, Phyllomedusa and Leptodactylus, are also attacked. A colleague of mine recently contacted me about a frog egg feeding species in Ecuador.
There are probably thousands of species of Megaselia in the Neotropical Region, most of which are unknown, and the lifestyles of the 350 or so known species are also relatively unstudied. It is possible that among them there are a whole range of flies attacking frog eggs. Herpetologists, keep the possibility of phorid flies in your mind!
Reference: Brown, B.V. & R.V. Horan, III. 2011. A key to Neotropical Region frog-egg-feeding species of Megaselia (Diptera: Phoridae), with a new species from Panama. Contributions in Science. 520: 1-4