Bacteriophage-encoded serine-integrases are members of the large family of serine-recombinases and catalyze site-specific integrative recombination between a phage attP site and a bacterial attB site to form an integrated prophage. Prophage excision involves a second site-specific recombination event, in which the sites generated by integration, attL and attR, are used as substrates to regenerate attP and attB. Excision is catalyzed by integrase but also requires a phage-encoded recombination directionality factor (RDF). The Bxb1 recombination sites, attP and attB, are small (<50 bp), different in sequence, and quasisymmetrical, and they give rise to attL- and attR-recombinant products that are asymmetric but similar to each other, each being composed of B- and P-type half-sites. We show here that the determination of correct excision products is a two-step process, with a presynaptic RDF-dependent step that aligns attL and attR in the correct orientation and a postsynaptic step in which the nonpalindromic central dinucleotide confers identity to attL and attR and prevents each from recombining with itself.