The genomes of Mycobacterium tuberculosis H37Rv and CDC1551 each contain two prophage-like elements, phiRv1 and phiRv2. The phiRv1 element is not only absent from Mycobacterium bovis BCG but is in different locations within the two sequenced M. tuberculosis genomes; in both cases phiRv1 is inserted into a REP13E12 repeated sequence, which presumably contains the bacterial attachment site, attB, for phiRv1. Although phiRv1 is probably too small to encode infectious phage particles, it may nevertheless have an active integration/excision system and be capable of moving from one chromosomal position to another. We show here that the M. tuberculosis H37Rv phiRv1 element does indeed encode an active site-specific recombination system in which an integrase of the serine recombinase family (Rv1586c) catalyses integration and excision and a small, basic phiRv1-encoded protein (Rv1584c) controls the directionality of re-combination. Integration-proficient plasmid vectors derived from phiRv1 efficiently transform BCG, can utilize four of the seven REP13E12 sites present in BCG as attachment sites, and can occupy more than one site simultaneously.