In conclusion, our studies revealed that immunity can stimulate autophagy by upregulating autophagy proteins in a p21-dependent manner, and the autophagic machinery was required for resistance against cerebral and ocular toxoplasmosis despite the induction of T. gondii-reactive T cells, IFN-γ, TNF-α and NOS2. Here, TNF is linked to ocular toxoplasmosis.