Conjugative plasmids and transposons have been found guilty of spreading antibiotic resistance genes from pathogen to pathogen. But how do they get past the bacterial defenses against incoming foreign DNA? Most bacteria have some sort of restriction-modification system to take care of just such molecular invaders. With such a system, they modify their own chromosomal DNA by adding methyl groups to specific residues within a short recognition sequence which is different for different enzymes. Incoming DNA that doesn’t have those particular sites methylated is “restricted,” i.e., cleaved, by the restriction endonuclease. This is end of game for an incoming phage or other mobile element that had replicated in a different strain or species.
Click "source" to read more.