IL-17-mediated immunity has emerged as a crucial host defense mechanism against fungal infections. Although Th cells are generally thought to act as the major source of IL-17 in response to Candida albicans, we show that fungal control is mediated by IL-17-secreting innate lymphoid cells (ILCs) and not by Th17 cells. By using a mouse model of oropharyngeal candidiasis we found that IL-17A and IL-17F, which are both crucial for pathogen clearance, are produced promptly upon infection in an IL-23-dependent manner, and that ILCs in the oral mucosa are the main source for these cytokines. Ab-mediated depletion of ILCs in RAG1-deficient mice or ILC deficiency in retinoic acid-related orphan receptor c(-/-) mice resulted in a complete failure to control the infection. Taken together, our data uncover the cellular basis for the IL-23/IL-17 axis, which acts right at the onset of infection when it is most needed for fungal control and host protection.