The protein Ocr (overcome classical restriction) from bacteriophage T7 acts as a mimic of DNA and inhibits all Type I restriction/modification (RM) enzymes. Ocr is a homodimer of 116 amino acids and adopts an elongated structure that resembles the shape of a bent 24 bp DNA molecule. Each monomer includes 34 acidic residues and only six basic residues. We have delineated the mimicry of Ocr by focusing on the electrostatic contribution of its negatively charged amino acids using directed evolution of a synthetic form of Ocr, termed pocr, in which all of the 34 acidic residues were substituted for a neutral amino acid. In vivo analyses confirmed that pocr did not display any antirestriction activity. Here, we have subjected the gene encoding pocr to several rounds of directed evolution in which codons for the corresponding acidic residues found in Ocr were specifically re-introduced. An in vivo selection assay was used to detect antirestriction activity after each round of mutation. Our results demonstrate the variation in importance of the acidic residues in regions of Ocr corresponding to different parts of the DNA target which it is mimicking and for the avoidance of deleterious effects on the growth of the host.