This long-term study of genetic diversity and epidemiology of the alpha-proteobacterium Bartonella in wild rodents from forest (Myodes glareolus and Apodemus flavicollis) and abandoned farmland (Microtus arvalis and Mi. oeconomus) was carried out in the years 2007-2009 in the Mazury Lakes District. In total, 1193 rodents were marked and recaptured, and 2226 blood samples were collected. The highest Bartonella prevalence was found in A. flavicollis (43.5%), the lowest in Mi. oeconomus (9.4%), while prevalence in My. glareolus and Mi. arvalis was, respectively, 13.2% and 11.8% (PCR of citrate synthase gltA gene fragment). Prevalence varied according to year and season, as well as sex of rodents. For woodland animals, a rapid decrease of prevalence was observed in late 2008, due to the dilution effect. Multiple (different species/genotypes of Bartonella in successive months) and mixed infections (more than one bacteria genotype in the same blood sample) were also diagnosed. Between 2835 and 4800000 colony forming units (CFU) per ml blood were recorded, with, for B. taylorii, significant differences between isolates from hosts belonging to different host families. Sequence analysis of 147 isolates revealed 37 gltA variants. In all four rodents, B. taylorii was the most prevalent, and could be divided into three main clades. One clade of B. grahamii was present in My. glareolus, A. flavicollis and Mi. arvalis, and both Microtus species were infected with a single clade of B. doshiae. A single isolate of B. birtlesii from A. flavicollis was collected, while two isolates could not be assigned to any known species. Nested clade analysis showed host specificity of 1st step clades (connected with rodent species) and 2nd step clades (connected with rodent family). Analysis was then extended to other housekeeping genes (cell division proteinftsZ, heat shock protein groEl, riboflavin synthase ribC, beta subunit RNA polymerase rpoB) and gene encoding 16S rRNA. Comparison of alleles of these genes in 27 isolates revealed numerous recombinant events, primarily involving groEl and 16S rRNA genes. Moreover, genetic recombination within housekeeping genes was also identified, and one of the unidentified Bartonella isolates was found to involve recombination within gltA between B. grahamii and B. taylorii. Examination of two T4SS pathogenicity genes (virB5 and bepA), revealed a similar pattern of extensive recombination. BepA from 17 isolates showed little diversity, concomitant with its role as an intra-cellular messenger. The virB5 gene (encoding a putative extra-cellular adhesin) from 22 isolates from voles (Arvicolidae) and A. flavicollis was distinctively different in sequence and putative structure, and showed a clear signature of horizontal gene transfer. Moreover, these recombinant events were often identified in the same isolates in which recombination of groEl or 16S rRNA was observed, suggesting that selection for this pathogenicity gene is important in the microevolution of Bartonella within rodents. In particular, Microtus spp. was central in the appearance of novel Bartonella isolates.