Recent experimental evidence has demonstrated that bacteria acquire resistance to viruses by incorporation of short transcribed nucleotide sequences into regions of clustered regularly interspaced short palindromic repeats (CRISPR). We have analysed community genomic data from acidophilic microbial biofilms and discovered that evolution of the CRISPR regions in two distinct Leptospirillum group II bacteria occurs fast enough to promote individuality in otherwise nearly clonal populations. Comparative genomics strongly indicates very recent lateral transfer of the CRISPR locus between these populations, followed by significant loss of spacer sequences and locus expansion by unidirectional heterogeneous addition of new spacer sequences. Diversification of the CRISPR region is inferred to be a population-level response to the rapidly changing selective pressure of phage predation. Results reinforce the importance of phage–host interactions in shaping microbial ecology and evolution over very short time scales.