Scientists might now be one step closer to understanding how one of nature’s most formidable weapons evolved.

The ankylosaurs were herbivorous, armor-plated dinosaurs which first appeared around 156 to 152 million years ago and spread out to every continent but Africa. One advanced subgroup known as the ankylosaurids upped the ante with an extra defense mechanism. At the end of their tails, most species had a gigantic club. Weighing up to 45 pounds or more, these bludgeoning tools could have been swung with incredible—perhaps even bone-shattering—force. 

A new paper, published in Journal of Anatomy, argues that the creatures’ firm tails pre-date these powerful clubs. As co-author Victoria Arbour points out, “In order for an ankylosaur to support the weight of a knob and swing it effectively, the tail needs to be stiff, like an axe handle … otherwise, the momentum generated by the knob’s weight could tear muscle or dislocate vertebrae.”

So, which came first, the inflexible tail or the heavy club? Or did they appear simultaneously? To test all three scenarios, Arbour and fellow paleontologist Phillip J. Currie looked over several million years’ worth of ankylosaur evolution, comparing and contrasting such animals as China’s Gobisaurus and the club-less Lianoningosaurus.

They observed that while stiff-tailed ankylosaurids arrived during the early Cretaceous Period (145 to 100 million years ago), clubbed species didn’t make their debut until much later on. So—to re-use Arbour’s “axe” analogy—it looks like the handle predates the blade. “While it’s possible that some of the species could still have developed … [both] in tandem,” she says, “it seems most likely that the tail stiffened prior to the growth of the … knob, in order to maximize the tail’s effectiveness as a weapon.”

Club-less species had other means of protection. Certain species—like North America’s Sauropelta—came with lethal-looking shoulder spikes. Also, stout Gastonia had shark fin-shaped blades running down its tail.

Virtually all ankylosaurs have been described as “tank-like” in appearance. That’s because bony plates called osteoderms covered much of their skin, rendering it all but impenetrable. With predators like T. rex around, such extreme measures were absolutely necessary.