These findings suggest that AtfA is critical to overcome oxidative stress induced by the host immune cells during the infection, providing a novel target for early prevention of A. flavus contamination. Here, ATF7 is linked to infection.