According to a new study, colonies of ants began farming fungi when an asteroid struck Earth 66 million years ago.

Report informs that in a paper published in the journal Science, scientists at the Smithsonian’s National Museum of Natural History analyzed genetic data from hundreds of species of fungi and ants to craft detailed evolutionary trees. Comparing these trees allowed the researchers to create an evolutionary timeline of ant agriculture and pinpoint when ants first began cultivating fungi.

“Ants have been practicing agriculture and fungus farming for much longer than humans have existed,” said entomologist Ted Schultz, the museum’s curator of ants and the lead author of the new paper. “We could probably learn something from the agricultural success of these ants over the past 66 million years.”