Modern-day dung beetles mostly eat the excrement of mammals: cows, elephants, you name it. But a new study hints at a reptilian source for the beetles’ original dung diet. Using ancient fossils and DNA from 450 modern scarab beetle species, scientists now estimate that dung-eating beetles popped up at least 115 million years ago, 30 million years earlier than previously thought. At the time, the only mammals around were tiny and would have produced dry dung pellets—poor eating for a dung beetle (like the one above). But the beetles’ origin does line up with the age of the dinosaurs and the rise of flowering plants. That probably meant less fiber in the diet of herbivorous dinosaurs and more palatable poop for the beetles, the researchers write this week in PLOS ONE. Plus, the team found evidence that some groups of dung beetles went extinct around the same time as the dinosaurs, having presumably lost a once-abundant and constant source of fecal food. But don’t expect this to be the last word. These estimates depend partially on which modern species and fossils are being analyzed, so the great dung beetle dating debate is likely to keep on rolling.