A particular species of fish were split by the formation of the Isthmus of Panama a long time ago. The fish developed changes in their genes to adapt to the new environment and became two different species. This process is called allopatric speciation, as shown in the image.
Allopatric speciation takes place when a species splits into two separate groups which are isolated from each other. Physical barriers like straits, waterways, cliffs or mountain ranges stop the gene flow between the two groups. This leads to the two groups of species diverging from each other as they start to adapt to the two different environments.