OmpF is one of the major general porins of Enterobacteriaceae that belongs to the first line of bacterial defense and interactions with the biotic as well as abiotic environments. Porins are surface exposed and their structures strongly reflect the history of multiple interactions with the environmental challenges. Unfortunately, little is known on diversity of porin genes of Enterobacteriaceae and the genus Yersinia especially. We analyzed the sequences of the ompF gene from 73 Yersinia strains covering 14 known species. The phylogenetic analysis placed most of the Yersinia strains in the same line assigned by 16S rDNA-gyrB tree. Very high congruence in the tree topologies was observed for Y. enterocolitica, Y. kristensenii, Y. ruckeri, indicating that intragenic recombination in these species had no effect on the ompF gene. A significant level of intra- and interspecies recombination was found for Y. aleksiciae, Y. intermedia and Y. mollaretii. Our analysis shows that the ompF gene of Yersinia has evolved with nonrandom mutational rate under purifying selection. However, several surface loops in the OmpF porin contain positively selected sites, which very likely reflect adaptive diversification Yersinia to their ecological niches. To our knowledge, this is a first investigation of diversity of the porin gene covering the whole genus of the family Enterobacteriaceae. This study demonstrates that recombination and positive selection both contribute to evolution of ompF, but the relative contribution of these evolutionary forces are different among Yersinia species