Gene flow is a mechanism of evolution that changes allele frequency by individuals entering or leaving a population. Allele frequency, the proportion of available slots at a given locus (location on a chromosome) that have a particular allele within a population, can change by migration. If new individuals arrive in a population, the allele frequency of any allele in a population can change without the occurrence of natural selection (in which individuals that are better adapted to their environment survive and reproduce more successfully than others). New individuals can bring new genes to add to the pool, or they may simply possess the same genes in different proportions. Similarly, if a group of individuals leaves a population, the pool of genetic variation can also shift.
Gene flow plays an important role in maintaining similarities within a species and preventing speciation. If gene flow is interrupted, such as when a species primarily exists in captivity, there is a loss of genetic variation. International breeding programs are in place for many endangered species to maintain gene flow. Through these programs, genetic materials are shared to maintain or increase genetic diversity as much as possible, even though the populations are small.