Contact inhibition of locomotion (CIL) is the process whereby cells collide, cease migrating in the direction of the collision, and repolarize their migration machinery away from the collision. Quantitative analysis of CIL has remained elusive because cell-to-cell collisions are infrequent in traditional cell culture. Moreover, whereas CIL predicts mutual cell repulsion and 'scattering' of cells, the same cells in vivo are observed to undergo CIL at some developmental times and collective cell migration at others. It remains unclear whether CIL is simply absent during collective cell migration, or if the two processes coexist and are perhaps even related. Here, we used micropatterned stripes of extracellular matrix to restrict cell migration to linear paths such that cells polarized in one of two directions and collisions between cells occurred frequently and consistently, permitting quantitative and unbiased analysis of CIL. Observing repolarization events in different contexts, including headto-head collision, head-to-tail collision, collision with an inert barrier, or no collision, and describing polarization as a two-state transition indicated that CIL occurs probabilistically, and most strongly upon head-to-head collisions. In addition to strong CIL, we also observed 'trains' of cells moving collectively with high persistence that appeared to emerge from single cells. To reconcile these seemingly conflicting observations of CIL and collective cell migration, we constructed an agent-based model to simulate our experiments. Our model quantitatively predicted the emergence of collective migration, and demonstrated the sensitivity of such emergence to the probability of CIL. Thus CIL and collective migration can coexist, and in fact a shift in CIL probabilities may underlie transitions between solitary cell migration and collective cell migration. Taken together, our data demonstrate the emergence of persistently polarized, collective cell movement arising from CIL between colliding cells.