Flesh fly parasitoid?

I was feeding my mantis two Sarcophaga flies that were mating, he was eating one, and there were larvae pouring out of it! There were some crawling on his head and he freaked out and threw the half eaten fly corpse on the ground. After he ate all the larvae on himself he caught the other and ripped into it, and there were larvae inside it as well. They were moving around like maggots but I’ve never heard of a fly parasitizing another fly…

I’m stumped, I couldn’t find anything on google about it so I’m asking here. What on earth was in those flies??

Those are sarcophagid babies

“Sarcophagidae differ from most flies in that they are ovoviviparous”. I think I either didn’t know this, or forgot.

To me, it represents a shift from “R-selected” (lots of young, with low parental investment, like fish spraying out lots of eggs) to “K-selected” (fewer young, with higher parental investment, which gives each individual baby a higher chance of survival. Like humans.) Others who are more knowledgeable about fly evolution can comment on this, if they want to.