One night about 230 million years ago, a reptilian predator stalked the desert in what’s now Scotland. The critter could probably fit in the palm of your hand, but it was a hunter nonetheless. It relied on its massive eyes to find prey in the darkness, like insects and small vertebrates. It’s known today as Scleromochlus, and it was really well adapted to life in the desert. Its long legs and feet carried it across the sand without sinking. And when it had eaten its fill, it curled up with some other members of its species to sleep the day away in the shadows of the dunes. Today, most fossils of Scleromochlus are found curled up together, suggesting they were buried by dune collapses. And entombed with these little bug-hunters is an evolutionary key. Because, even though it had no wings, Scleromochlus had some features that link it with another group of mysterious reptiles: the pterosaurs. Some scientists think that the relationship between pterosaurs and Scleromochlus is pivotal for understanding some of the greatest evolutionary mysteries about pterosaurs:  like, where they came from, and how they developed the ability to fly. But, when pterosaurs first took flight, you could say that it marked the beginning of the end for the winged reptiles. Because, strangely enough, the power of flight -- and the changes that it brought about -- may have ultimately led to their downfall. To unravel the mystery of pterosaur origins, we have to start by figuring out what they’re related to. And this is quite a puzzle, because pterosaurs had very fragile bones. This made them light in the air, but it also meant that they didn’t fossilize very well. And because they were highly specialized for flight, they lost some of the features that could tell us who they’re related to. Most paleontologists consider pterosaurs to be a type of archosaur, a group that includes dinosaurs and crocodiles, among other things. And many experts also consider pterosaurs to be closer to dinosaurs than they are to crocodiles, part of a grouping called ornithodirans or “bird-line archosaurs.” But while pterosaurs are hard to place in relation to other animals, it’s pretty easy to place them together as a group. All pterosaurs look like, well, pterosaurs - with unusually large skulls, extra-long fingers, and of course, fully developed wings. One of the oldest pterosaurs currently known is Eudimorphodon, from the late Triassic of Europe. And it belongs to one of the two main groups of pterosaurs, a group called Rhamphorhynchoids. These pterosaurs were generally on the smaller side, and often had longer tails, and had differentiated teeth. And they were distinct from the other group of pterosaurs, known as the Pterodactyloids. Those pterosaurs typically had shorter tails, longer wrist bones, big crests, and either simple teeth or no teeth at all. The Pterodactyloids would go on to include the largest animal that ever flew, Quetzalcoatlus. But of course, the rhamphorhynchoids were also fully equipped for flying, with complete wings and membranes that ran the length of their legs. But for each group, the fossil record doesn’t tell us much about where they came from. Which leads us to the next big mystery surrounding pterosaurs – how did they develop the ability to fly in the first place? Well, pterosaurs probably didn’t go from having no-wings to having full-wings in a single evolutionary leap. So when it comes to how pterosaurs got their wings, there are three general theories. The first theory suggests that the ancestors of pterosaurs lived in trees, and got around by jumping from branch to branch. This is called the arboreal leaping theory, which sounds kinda fun. And it suggests that pterosaur ancestors may have had a bit of membrane on their arms helped them glide for short distances. Then, this advantage might’ve selected for a larger, partial wing that would’ve let them go a little farther. And then eventually the same pressures would lead to the membrane becoming a full wing. But other scientists think the ancestors of pterosaurs might have been falling, rather than jumping. This theory -- known as the arboreal parachute model -- suggests that, like some lizards today, pterosaur ancestors could have scrambled around in trees and then fallen down to the next branch if they were threatened. This, again, would’ve been safer with skin connecting their arms and legs, so that advantage could have led to larger and larger membranes until ... wings. But not all theories have the earliest pterosaurs living in trees. There’s also the ground-up theory, which suggests that they were terrestrial and bipedal. So in this model, the feeding habits of pterosaur ancestors might have involved running and jumping to catch things like flying insects. In which case, having partial wings would have helped them jump higher to catch their prey – and eventually, winged jumping could have turned into flight. So which theory works best? Did pterosaurs come from bipedal, running ancestors, or quadrupedal ancestors that lived in trees? To answer that, we need to go back to Scleromochlus. Scleromochlus wasn’t a pterosaur. I mean, probably. But based on its physical features, most studies classify Scleromochlus as an early ornithodiran, one of those “bird-line archosaurs” that include the pterosaurs. Which kinda makes sense because Scleromochlus had a lot of traits in common with pterosaurs. It had shoulder blades that were a lot like those of pterosaurs, with long bony projections where arm muscles attached. Now, Scleromochlus couldn’t fly, but it’s easy to see how these features could have been adapted by an early flying pterosaur. It also had four long toes, a really big but lightly-built head, a square pelvis, and very small fibulae, or lower leg bones -- all traits found in pterosaurs. So even if Scleromochlus itself wasn’t the pterosaur ancestor, many paleontologists think something like it was probably what ancestral pterosaurs looked like. So the next question is: Did Scleromochlus live in the trees, or on the ground? Well, its body gives us some important clues. Its back legs were much longer than its front legs, and it had a long tail. It seemed to have walked its toes, rather than on the flats of its feet. And its fingers weren’t very long, so it didn’t have the grasping ability that many tree-dwelling animals have. You know what? In some ways, it actually kind of looked like a jerboa – a little modern mammal that gets across the desert by hopping like a kangaroo. So Scleromochlus was likely terrestrial, and either hopped or ran along the ground. And it wasn’t alone. Several other early ornithodirans have also been interpreted as small, jerboa-like animals. So the terrestrial ancestor fits perfectly with the ground-up theory, right? Episode done, goodbye everybody! Haha, nah. There’s actually lots of evidence to suggest that, even if their ancestors were bipedal, pterosaurs themselves were quadrupedal. They have shoulder joints that are oriented for walking on all fours, and the weird tracks they left behind are all quadrupedal. So little Scleromochlus appears to be a bipedal, ancestral cousin of a quadrupedal group. Some scientists think that when their wings became large and heavy enough, early pterosaurs started to walk on four feet, so they didn’t fall on their faces. But many other scientists think there was something between a bipedal ancestor and the pterosaurs – something that was arboreal, and quadrupedal that hasn’t been found in the fossil record yet So the evolution of pterosaurs is still foggy. But what we do know is that, over their 150 million years of existence, pterosaurs only became more well-adapted for flight. They probably had unidirectional air flow, just like modern birds do, making them very efficient at breathing, even while flying. And some pterosaurs also had weird little feathers. And even though pterosaurs are all lightly built, the later pterosaurs were even lighter. They had more air chambers in their bones and fewer vertebrae. All of these things, and more, helped pterosaurs conquer the skies … eventually. Fact is, for the first 100 million years or so of their existence, pterosaurs weren’t very diverse; the earliest ones were all just little bug eaters. But around 125 million years ago, they started to change. They became dramatically more diverse, nearly doubling in the number of species. They grew extravagant crests and began hunting fish and other vertebrates instead of just bugs. Familiar species like Pteranodon and the largest creature to ever fly, Quetzalcoatlus , took over the skies. What happened to make them so diverse? A little evolutionary pressure from another group related to those early Ornithodirans... birds. Birds began to show up in the fossil record during the late Jurassic Period, about 160 million years ago. So birds and pterosaurs coexisted for 60 million years. And it wasn’t until AFTER birds evolved that pterosaurs started to move out of their niche of “tiny, flying bug-eaters”. In fact, some fossil formations, like the Jehol group in China, preserve lots of different birds and pterosaurs together, each of which ate slightly different things in slightly different environments. But one of the things that pterosaurs did best was something bodybuilders know a bit about: getting big. Pterosaurs grew to sizes that birds couldn’t reach. The biggest birds of the late-Cretaceous, like Avisaurus, had wingspans no more than 2 meters across. But pterosaurs like Quetzalcoatlus reached at least 11 meters! These larger sizes allowed pterosaurs to conquer ecological niches that weren’t available to birds, like flying long distances over the open ocean in search of food. So pterosaurs and birds coexisted peacefully… until things changed. We’ve all seen this movie by now! The end of the Cretaceous Period, some 66 million years ago, was marked by the extinction event that wiped out the non-avian dinosaurs. But the animals that did survive had something in common: they were all pretty small. Being small meant mammals and birds could live on less food, a helpful trait in a post-impact world. But Pterosaurs had grown bigger and bigger to find roles where they could hold their own against birds. By the late Cretaceous, they all had wingspans between 2 and 10 meters, meaning that the smallest pterosaur at the time of the extinction event was about the size of a bald eagle. So in the end, it may have been that their size – impressive as it was - doomed them to extinction. Perhaps -- just perhaps -- if they'd stayed on the ground, or remained the size of little