How a toxic fungus became the koji mold that brings us soy sauce

Nearly 9,000 years ago, around the time that humans were first domesticating corn and pigs, some people in China were taming fungi.

One such fungus, the mold Aspergillus oryzae, would go on to become a culinary superstar. Through fermentation of raw ingredients like soybeans or rice, A. oryzae helps to bring us soy sauce, sake and several other traditional Asian foods. It does so by breaking down proteins and starches so that other microbes can finish off the fermentations.

But A. oryzae wasn’t always so obliging. The wild version of the mold makes potent toxins that can poison the consumer and lead to cancer in the liver and other organs. Plus, it’s a destructive agricultural pest that causes millions of dollars in damage each year to crops like peanuts and corn.