Some animals wait their whole lives to breed, only to die right after. But for hundreds of ancient horny frogs, death came knocking during sex. On July 6, paleontologists unraveled the mystery behind the sudden disappearance of hundreds of mating frogs 45 million years ago. Their new study, published in the journal Papers in Palaeontology, suggests a swamp where frog mating took place 45 million years ago was actually a watery death trap.

The mucky graveyard lies in the Geiseltal area in central Germany—though it looks different from before. Nowadays, the swamp is home to thousands of fossils, and is a scientific jackpot for paleontologists who want a window into how life on Earth was like millions of years ago.

If you traveled back to the middle Eocene, you would find a much hotter Earth. The Geiseltal area itself was covered in a swampy subtropical forest; it was also a dangerous place to live as it was filled with ancient creatures such as large crocodiles, giant snakes, and different frogs and toads. Amphibians were not the only victims snared in the swamp’s trap: It also claimed the lives of more than 50,000 prehistoric birds, horses, bats, and fish.

[Related: Shifting ancient climates shaped human evolution]

Decades-old research on the frogs from the fossil deposit suggested they died because of a lack of dissolved oxygen in the swamp’s aquatic habitats. But the authors of the new study say this is unlikely because the frogs were capable of migrating to other bodies of water when conditions were harsh. So, the exact cause of death remained a mystery.

The paleontologists behind the new paper studied the skeletal remains of 168 frogs—most belonging to the Pelobatidae family—to find a clue to how they perished. Some of the common themes were the loss of abdominal bones and one or more limbs. “As far as we can tell, the fossil frogs were healthy when they died, and the bones don’t show any signs of predators or scavengers. There’s also no evidence that they were washed in during floods, or died because the swamp dried up,” said Daniel Falk, a PhD student at the University College Cork (UCC) in Ireland and lead author of the study, in a press release. As the team ruled out several causes of death, they were left with one plausible option: The frogs died during sex.

One piece of evidence to support this hypothesis is where the fossils were located. Geiseltal fossil frogs were primarily land-dwellers. They only returned to bodies of water, like the swamp, when they wanted to mate. The researchers suggest that exhaustion from constant breeding or drowning could have led to the frogs’ sudden demise.

[Related: 7 animal mating rituals that make horseshoe crab orgies look tame]

The likelihood of dying during sex is also common in modern-day amphibians like the South American Rhinella proboscidea. Males pile on the female in a fierce competition to mate, causing her to drown or suffocate. “Female frogs are at higher risk of drowning as they are often submerged by one or more males—this often happens in species that engage in mating congregations during the short explosive breeding season,” Maria McNamara, a professor of paleontology at UCC and senior study author, also said in the press release. “What’s really interesting is that fossil frogs from other sites also show these features, suggesting that the mating behaviors of modern frogs are really quite ancient and have been in place for at least 45 million years.”

While these ancient frogs paid a big price for a fling, it may be a great payoff for paleontologists looking into the Earth’s past. What’s more, the findings could help biologists understand how these ancient horndogs evolved to the slimy green amphibians we know today.