Heterologous immunity, when the memory T cell response elicited by one pathogen recognizes another pathogen, has been offered as a contributing factor for the high variability in coronavirus disease 2019 (COVID-19) severity outcomes. Here we demonstrate that sensitization with bacterial peptides can induce heterologous immunity to severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) derived peptides and that vaccination with the SARS-CoV-2 spike protein can induce heterologous immunity to bacterial peptides. Using in silico prediction methods, we identified 6 bacterial peptides with sequence homology to either the spike protein or non-structural protein 3 (NSP3) of SARS-CoV-2. Notwithstanding the effects of bystander activation, in vitro co-cultures showed that all individuals tested (n=18) developed heterologous immunity to SARS-CoV-2 peptides when sensitized with the identified bacterial peptides. T cell recall responses measured included cytokine production (IFN-γ, TNF, IL-2), activation (CD69) and proliferation (CellTrace). As an extension of the principle of heterologous immunity between bacterial pathogens and COVID-19, we tracked donor responses before and after SARS-CoV-2 vaccination and measured the cross-reactive T cell responses to bacterial peptides with similar sequence homology to the spike protein. We found that SARS-CoV-2 vaccination could induce heterologous immunity to bacterial peptides. These findings provide a mechanism for heterologous T cell immunity between common bacterial pathogens and SARS-CoV-2, which may explain the high variance in COVID-19 outcomes from asymptomatic to severe. We also demonstrate proof-of-concept that SARS-CoV-2 vaccination can induce heterologous immunity to pathogenic bacteria derived peptides.