Phase variation of the UU172 phase-variable element of Ureaplasma parvum is governed by a DNA inversion event that takes place at short inverted repeats. The putative tyrosine recombinase XerC of Ureaplasma has been suggested as a mediator in the proposed site-specific recombination event. Here, we provide evidence that XerC mediates DNA inversion at the inverted repeats located on a synthetic locus that was introduced into the model organism Escherichia coli. Synthetic loci were created by exchanging the genes UU171 and UU172 with the two reporter genes gfp (green fluorescent protein) and mrfp1 (monomeric red fluorescent protein 1) either containing or missing the inverted repeats of the UU172 phase-variable element. E. coli was transformed with these loci and also co-transformed with the expression vector pBAD24 that contained the xerC gene behind the arabinose inducible pBAD promoter. Upon XerC expression, DNA inversion was observed only in the locus that contained the inverted repeat regions. We also demonstrate that XerC can process the recombination event with both an N-terminal maltose binding protein tag and a C-terminal 6×His tag in E. coli. A XerC mutant, where the proposed catalytic tyrosine residue 228 was exchanged with an alanine, did not process the recombination event.