during crossing-over
During crossing-over, segments of DNA are exchanged between non-sister chromatids of homologous chromosomes. Notice how this can result in an allele A on one chromosome being moved to the other chromosome. The four chromatids compose the tetrad, with a chiasma at the point of exchange.