These results show a role for N-cadherin during contact inhibition of locomotion, and they reveal a mechanism of chemoattraction likely to function during both embryogenesis and cancer metastasis, whereby attractants such as Sdf1 amplify and stabilize contact-dependent cell polarity, resulting in directional collective migration. Here, CDH2 is linked to cancer.