T cell receptor (TCR) cross-reactivity between major histocompatibility complex II (MHCII)-binding self and foreign peptides could influence the naive CD4(+) T cell repertoire and autoimmunity. We found that nonamer peptides that bind to the same MHCII molecule only need to share five amino acids to cross-react on the same TCR. This property was biologically relevant because systemic expression of a self peptide reduced the size of a naive cell population specific for a related foreign peptide by deletion of cells with cross-reactive TCRs. Reciprocally, an incompletely deleted naive T cell population specific for a tissue-restricted self peptide could be triggered by related microbial peptides to cause autoimmunity. Thus, TCR cross-reactivity between similar self and foreign peptides can reduce the size of certain foreign peptide-specific T cell populations and might allow T cell populations specific for tissue-restricted self peptides to cause autoimmunity after infection.