This is the goblin shark, a deep-sea fish with a terrifying face and the ability to transform into a deep-sea fish with a terrifying face that’s suddenly a lot closer to you. By which I mean: its jaws can shoot forward, turning its already grotesque visage into something truly nightmarish.

The goblin shark isn’t alone. Here’s the aptly named slingjaw wrasse, slinging its jaw.

Here’s a shot of the Red Bay snook doing the same. Here’s a tiger fish not quite matching the snook or the wrasse, but certainly shoving its toothy maw further out than it normally sits. And here’s the most disturbing example of all—the moray eel, which grabs prey that it has already bitten, using a second set of Alien-style jaws that sit inside its throat.

Thousands of fish species can sling their jaws forward, and some can do it up to a quarter of their body length. This ability allows them to snatch prey from inaccessible crevices, to launch ballistic ambushes, and to close those final critical millimetres on targets that are threatening to escape. David Bellwood from James Cook University describes these “protrusible jaws” as the “one of the most important innovations in vertebrate feeding over the last 400 million years”, and he has now charted their evolution over the last 100 million of those.

Fish jaws are complicated machines that comprise many moving bones and parts. But Bellwood found that this complexity can be distilled into one simple variable: the length of one particular jaw bone. By itself, it can accurately predict how far a fish can extend its jaws. And by measuring this bone in fossil fish, Bellwood could reconstruct the rise of extending jaws over time.

During the late Cretaceous period (66 to 100 million years ago), when dinosaurs still dominated the land, the average fish could only extend its jaws by less than 1 percent of its body length. Even the most protrusible protruders could only manage 8 percent. By the Eocene period (34 to 56 million years ago), the average fish could extend their jaws by 2 percent, and the best of them achieved 13 percent. Today, the average extension is 3 percent, and the champion—the slingjaw wrasse—manages a whopping 21 percent.

So, as a group, fish have gradually evolved to sling their jaws out further and further. This trend partly reflects the rise of the acanthomorphs—the massively diverse group that includes many of the fish you’re familiar with. Cod, tuna, mackerel, sole, pike, seahorses, eels, angelfish, and wrasses are all acanthomorphs.

Other fish may have made small evolutionary in-roads into jaw-slinging but the acanthomorphs are the true innovators. Bellwood’s results suggest that they’ve been at it since their origins around 140 million years ago, and different groups have independently evolved the ability between 8 and 15 times. Perhaps jaw-slinging even helps to explain why the acanthomorphs have become so successful, and today account for some 60 percent of all fish species.

And what of their prey? They could have adapted to these new threats in many ways: hiding in sand; developing hard armour; or become faster and more agile. But Bellwood thinks that their most effective tactic would have simple to become smaller, and thus harder to spot.

There’s some evidence that crabs and other crustaceans—among the favoured prey of jaw-slinging fish—started shrinking during the Cretaceous. And certainly, the average crustacean in today’s coral reefs is just 0.4 millimetres long. The fish themselves show signs of these changes: during the Eocene, their mouths became smaller and the eyes bigger, suggesting a shift towards smaller and less conspicuous prey. Protruding jaws closed the gap between fish and their prey by mere millimetres and centimetres, but changed the evolutionary fates of both groups for vast stretches of time.