A newly discovered, two-meter-long shrimp-like creature was once the largest animal on the planet. Unearthed in southeastern Morocco, these fossils date back to the Ordovician, about 443 million to 485 million years ago. The fossils, described in Nature this week, also help explain how the legs of today’s arthropods evolved.

Anomalocaridids are giant prehistoric sea creatures and the early relatives of modern arthropods, which includes insects, spiders, and crustaceans. They had a head with a pair of grasping appendages and a circular mouth that’s surrounded by toothed plates. Anomalocaridids are usually thought of as predators, nabbing prey with their head limbs, though some filter-feeding forms are known. We know a lot about the anatomy of their heads and not as much about their long, segmented bodies.

Now, Yale’s Peter Van Roy and colleagues analyzed a new anomalocaridid fossil (preserved in 3D) unearthed in the Lower Fezouata Formation of Morocco. It would have reached more than two meters in length—making it bigger than most arthropods that ever lived. It had ribbon-like structures on the back that likely functioned as gills, and like its earlier relatives from the Cambrian (as well as modern baleen whales), this animal had head appendages adapted for filter feeding. “Giant filter-feeding sharks and whales arose at the time of a major plankton radiation, and Aegirocassis represents a much, much older example of this—apparently overarching—trend,” Van Roy says in a news release. Here’s its filter-feeding appendage:

They named it Aegirocassis benmoulae after Ægir, a Norse god of the sea, and “cassis,” Latin for helmet, referring to its elaborate head shield. The species name honors its discoverer.

Importantly, the team also revealed never-before-seen details of anomalocaridid trunk anatomy. All arthropods have hard exoskeletons and bodies and legs made up of multiple segments—each segment can be modified separately for different purposes. Additionally, arthropod legs typically have two branches, each of which is highly modified to suit specific functions: from locomotion and copulation to respiration and sensing its surroundings. In insects and many other land-dwelling arthropods, the external branches have been lost altogether.

“It was believed that anomalocaridids possessed only one set of flaps, and it wasn’t clear to what structure in other arthropods these flaps were equivalent,” Van Roy explains in The Conversation. Additionally, “it was generally accepted that, as a result of their swimming lifestyle, anomalocaridids had completely lost their trunk limbs during the course of evolution.” Not so, as it turns out.

Aegirocassis had not one but two separate pairs of flaps per segment: The upper flaps (likely associated with gills) were equivalent to the upper limb branch of modern aquatic arthropods, and the lower flaps represent modified walking limbs adapted for swimming. A reexamination of older anomalocaridid species revealed the presence of these previously overlooked flaps as well. That means anomalocaridids represent a stage before the upper and lower branches fused into the double-branched limb we see in modern arthropods.

Images: Marianne Collins, ArtofFact (top), Peter Van Roy/Yale University (middle), Peter Van Roy/Yale University & Allison C. Daley/University of Oxford CC BY-NC-ND (bottom)