TrwC is a DNA strand transferase that catalyzes the initial and final stages of conjugative DNA transfer. We have solved the crystal structure of the N-terminal relaxase domain of TrwC in complex with a 27 base-long DNA oligonucleotide that contains both the recognition hairpin and the scissile phosphate. In addition, a series of ternary structures of protein-DNA complexes with different divalent cations at the active site have been solved. Systematic anomalous difference analysis allowed us to determine unambiguously the nature of the metal bound. Zn2+, Ni2+ and Cu2+ were found to bind the histidine-triad metal binding site. Comparison of the structures of the different complexes suggests two pathways for the DNA to exit the active pocket. They are probably used at different steps of the conjugative DNA-processing reaction. The structural information allows us to propose (i) an enzyme mechanism where the scissile phosphate is polarized by the metal ion facilitating the nucleophilic attack of the catalytic tyrosine, and (ii) a probable sequence of events during conjugative DNA processing that explains the biological function of the relaxase.