To fight the pestilence, the ants aligned themselves with a bacteria that produces a chemical capable of subduing the parasite. Now, Dr. Currie and his colleagues have found evidence that suggests that the partnership between ants and antimicrobial bacteria has existed for tens of millions of years. The key clues came from two 20-million-year-old ants that were discovered, trapped in amber, in the Dominican Republic.

Image A fossilized leafcutter ant, Apterostigma eowilsoni, trapped in amber. The ant's head had tiny pockets that housed fungus-protecting bacteria. Credit... Hongjie Li et al.

One of the fossilized ants had specialized pockets on its head, called crypts, that are also seen on modern ants. The crypts are known to house the fungus-protecting bacteria, called actinobacteria. The other ant specimen was entombed with gas bubbles on its body, likely produced by the respiration of the actinobacteria.

“It’s kind of like the ants are walking pharmaceutical factories,” said Dr. Currie, who is an author of the study, which appeared Monday in the journal Proceedings of the National Academy of Sciences. “This indicates that, like in the way ants predated us in growing crops, they also predated us by tens of millions of years in associating with microbes to produce antibiotics.”

[Like the Science Times page on Facebook. | Sign up for the Science Times newsletter.]

Hongjie Li, an evolutionary biologist in Dr. Currie’s lab and the lead author of the study, was inspecting the amber specimens last summer, using a scanning electron microscope at the Smithsonian Institution, when he and his colleagues found signs that the amber ants carried bacteria in a manner similar to modern ants.

“It was a shock to me,” said Dr. Li.

The team combined that finding and published data on 69 other ant species to reconstruct the ant’s evolutionary tree. The results indicated that the ants established their partnership with the bacteria tens of millions of years ago, shortly after they developed their fungus-farming abilities.