In 1667, a Danish scientist finally concluded that certain mysterious stones prized for their supposed medicinal powers, weren’t fallen from the sky during lunar eclipses and weren’t serpent tongues. In fact, they were fossilized teeth— many belonging to a prehistoric species that would come to be called megalodon, the biggest shark to ever live.

So what was it like when megalodon ruled the seas? And what brought this formidable predator to extinction? Because their skeletons were cartilaginous, what remains of megalodons are mostly scattered clues, like some isolated vertebrae and lots of their enamel-protected teeth. Like many sharks, megalodons could shed and replace thousands of teeth over the course of their lives. Interestingly, some fossil sites harbor especially high numbers of small megalodon teeth. Experts believe these were nurseries that supported countless generations of budding megalodons. They grew up in sheltered and food-packed shallow waters before becoming unrivaled adult marine hunters.

Looking at the similarities with great white shark teeth, scientists estimate that megalodons might have stretched up to 20 meters— three times longer than great whites. And during their reign, which began around 20 million years ago, megalodons lived just about everywhere, with individuals also potentially undertaking transoceanic migrations. The world was warmer and the ocean was brimming with life. Otters and dugongs thrived in newly formed kelp forests, and baleen whales were at their most diverse. Megalodons had no shortage of high-energy, edible options. And it seems they were ambitious eaters. Generally, as carnivores consume protein-rich meat, certain nitrogen isotopes accumulate in their tissues— including the enamel of their teeth. Analyzing megalodon teeth, scientists confirmed they were apex predators that not only ate large prey species— but also other predators, perhaps even each other.

In addition to megalodon’s teeth, researchers have access to one exceptionally well-preserved spinal column that comprises 141 vertebrae of a 46-year-old megalodon. A 3D model of the megalodon’s body suggests that its stomach could reach volumes of almost 10,000 liters— big enough to fit an entire orca. Reconstructing their jaws, researchers think megalodons could eat a now-extinct 7-meter sperm whale in as few as four bites. And the fossilized bones of ancient cetaceans do indeed show evidence of megalodon bite marks— including some that healed over, confirming that megalodons pursued live prey.

But if megalodons were so powerful, why did they go extinct? It seems there were a few contributing factors. By the time they disappeared around 3.5 million years ago, the global climate had cooled, causing more glaciers to form and the sea level to drop. This dried up many coastal habitats, meaning some of the world’s most resource-rich marine sites were lost. About a third of all marine megafauna eventually went extinct, so fewer prey species were available. And megalodons already faced high energetic demands because of their size and the mechanism they likely used to regulate their body temperature, which allowed them to navigate cold waters and attack prey with bursts of speed. Environmental changes may have made megalodons vulnerable and increasingly put them in competition with other predators, including the great white shark, a relative newcomer.

Because megalodons were highly mobile predators, their extinction had global consequences. The end of their long-distance travels probably disrupted nutrient transport between different ecosystems. And many animals were suddenly released from the immense predatory pressure of their bite. Interestingly, some marine mammals dramatically increased in size afterwards, which was perhaps partially afforded because they were no longer dealing with such a mega-existential threat. Conservationists are working hard to prevent sharks from facing a similar fate as the apex predators, this time due to human interference. The megalodon serves as a reminder of the importance of ecological interdependence and of the millions of years of bones that it has bitten and waters it has wandered.