Pneumonia caused by Streptococcus pneumoniae ( Sp) remains a leading cause of serious illness and death worldwide. Immunization with conjugated pneumococcal vaccine has lowered the colonization rate and consequently invasive diseases by inducing serotype-specific antibodies. However, many of current pneumonia cases result from infection by serotype strains not included in the vaccine. In this study, we asked if cross-protection against lung infection by heterologous strains can be induced and investigated the underlying immune mechanism. We found that immune mice recovered from a prior infection were protected against heterologous Sp strains in the pneumonia challenge model, as evident by accelerated bacterial clearance, reduced pathology and apoptosis of lung epithelial cells. Sp infection in the lung induced strong Th17 responses at the lung mucosal site. Transfer of CD4 + T cells from immune mice provided heterologous protection against pneumonia, and this protection was abrogated by IL-17A blockade. Transfer of memory CD4 + T cells from IL-17A knockout mice failed to provide protection. These results indicate that memory Th17 cells played a key role in providing protection against pneumonia in a serotype independent manner and suggest the feasibility of developing a broadly protective vaccine against bacterial pneumonia by targeting mucosal Th17 T cells.