Around 50 million years ago, some ants in South America decided to give up the old hunter-gatherer routine and try their hand at a new way of feeding themselves. They began tending fungi, fertilizing their garden with organic litter they found so it would grow, and then nibbling nutritious bits off their crop. Long before humans started doing it or even came on to the scene, these ants invented farming. 

One of these fungus-farming ants is Apterostigma megacephala, which was described and named based on just four lonely specimens found scattered around the Amazon in 1999. Years of searching failed to turn up more, until a colony was discovered right under scientists’ noses along a service road at a zoo. Digging into the ants’ DNA turned up something interesting: The species is the sole survivor of a lineage that split off from the other farming ants around 39 million years ago. Looking at their fungal crops, researchers found something even more surprising. The insects are, a team led by entomologist Ted Schultz says, “The ant equivalent of … Neanderthals cultivating GMO crops.”

Today, there more than 250 species of fungus-farming ants, all found in the Americas and grouped into the tribe Attini. Unlike their human counterparts, who can scale their farming operations up and down or switch crops in and out, these farmer ants are more or less locked into two groups with certain ways of doing things. The “lower-attine” ants cultivate small gardens using fungi that can also live on their own in the wild. Like the primitive farmer ant ancestor, they fertilize their crops with dead matter they find lying around. The “higher-attine” ants are more sophisticated. They live in larger, more complex colonies and feed their fungal crops—which are truly domesticated and unable to live apart from the ants—with live, fresh-cut plant pieces that they harvest. 

Apterostigma megacephala doesn’t appear to play by these rules, and is the first and only lower-attine ant that’s been found farming a higher-attine fungus. It cultivates a highly domesticated fungus that’s much younger than itself and only originated in the gardens of higher-attine leaf-cutter ants less than 10 million years ago.

Switching from one kind of fungus to another is rare for these farmers, because each ant species is compatible only with specific fungi due to biological constraints. Some ants, for example, rely on their fungal crops for certain amino acids that they’re unable to produce themselves, and can’t farm fungi that don’t make these acids. Other ants carry bacteria that control harmful fungi and maintain the health of their gardens, without which their fungal crop wouldn’t survive. In experiments where ants have been given a new fungus to grow, both the crop and the farmers quickly died because of their incompatibility. 

So how did the primitive Apterostigma megacephala farmers get a hold of a relatively new, domestic fungus and make it work? Schultz isn’t sure yet, but his team thinks that one of the farming ants’ common ancestors may have been able to cultivate a variety of fungi without any constraints, and A. megacephala’s branch of the family tree might have maintained that flexibility while the other ants didn’t. Alternatively, after its split from the rest of the farmers, A. megacephala may have evolved some biological feature that “pre-adapted” it to work with this particular fungus, allowing the species to make the switch from some other crop.

To get to the bottom of this mystery, more A. megacephala nests will need to be closely studied and compared to their distant cousins. Fortunately, the researchers say, the recent discovery of new A. megacephala colonies in Brazil will make this possible.