These results indicate that IL-17A can induce protective immunity to Mtb in the context of a primary infection, and that this may have potential as a therapeutic approach. Here, IL17A is linked to infection.