We introduce a strategy for evolving protein substrate specificity by the insertion of random amino acid loops into the protein backbone. Application of this strategy to human O6-alkylguanine-DNA alkyltransferase (AGT) led to the isolation of mutants that react with the non-natural substrate O6-propargylguanine. Libraries generated by conventional random or targeted saturation mutagenesis, by contrast, did not yield any mutants with activity towards this new substrate. The strategy of loop insertion to alter enzyme specificity should be general and applicable to other classes of proteins. An important application of the isolated AGT mutant is in molecular imaging, where the mutant and parental AGTs are used to label two different AGT fusion proteins with different fluorophores in the same living cell or in vitro . This allowed the establishment of fluorescence-based assays to detect protein-protein interactions and measure enzymatic activities.