Mycobacteriophages provide an abundance of systems for use in mycobacterial genetics, including manipulation of Mycobacterium tuberculosis. Because of the dearth of antibiotic resistance cassettes and biosafety concerns in constructing recombinant virulent M. tuberculosis strains, we developed the use of mycobacteriophage-encoded repressor genes that can be selected in the presence of lytic versions of their cognate phages. The phage Adephagia repressor gene (43) was identified through its ability to confer immunity to Adephagia superinfection, together with the mapping of mutations in gene 43 that confer a clear-phage phenotype. Plasmid transformants containing either Adephagia 43 or the previously identified BPs repressor 33 can be readily selected following electroporation using engineered lytic derivatives of Adephagia and BPs, respectively. Selection is as efficient as antibiotic selection, can be used with either single-copy integration vectors or with extrachromosomal vectors, and works similarly in both Mycobacterium smegmatis and M. tuberculosis.