Lateral DNA transfer--the movement of genetic traits between bacteria--has a profound impact on genomic evolution and speciation. The efficiency with which bacteria incorporate genetic information reflects their capacity to adapt to changing environmental conditions. Integron integrases are proteins that mediate site-specific DNA recombination between a proximal primary site (attI) and a secondary target site (attC) found within mobile gene cassettes encoding resistance or virulence factors. The lack of sequence conservation among attC sites has led to the hypothesis that a sequence-independent structural recognition determinant must exist within attC. Here we report the crystal structure of an integron integrase bound to an attC substrate. The structure shows that DNA target site recognition and high-order synaptic assembly are not dependent on canonical DNA but on the position of two flipped-out bases that interact in cis and in trans with the integrase. These extrahelical bases, one of which is required for recombination in vivo, originate from folding of the bottom strand of attC owing to its imperfect internal dyad symmetry. The mechanism reported here supports a new paradigm for how sequence-degenerate single-stranded genetic material is recognized and exchanged between bacteria.