Bacteria frequently exchange DNA among each other by horizontal gene transfer. However, maintenance of species identity and in particular speciation requires a certain barrier against an unregulated uptake of foreign DNA. Here it is suggested that formation of such a barrier is one important biological function of restriction/modification systems, in addition to the classical function of protection of bacteria against bacteriophage infection. This model explains the extreme variability and wide distribution of restriction/modification systems among prokaryotes, the prevalence of RM-systems in pathogenic bacteria and the existence of several RM-systems in single bacterial strains.