While some controversy remains, most geologists believe that Panama initially formed as a peninsula of Central America, projecting southward along the southwestern edge of the Caribbean Plate. It is thought to have formed primarily from two periods of subduction volcanism and oceanic crust accretion involving the oceanic Farallon Plate, now represented by the Cocos and Nazca Plates off Central and South America, respectively. The first period is thought to have occurred from the late Cretaceous into the early Tertiary, some 70-50 million years ago (MYA), while the the latter began in the Miocene (about 20 MYA) and continued intermittently until about 4 MYA.
At that point, the southern tip of the peninsula began to collide with the northwest edge of the South American Plate, crumpling both regions and bending Panama into its current shape, a curving east-west strip of land separating the Caribbean Sea from the Pacific Ocean. The formation of this Isthmus had a dramatic effect on ocean currents and, most climatologists believe, on our planet's climate. In particular, the Gulf Stream began to bathe western Europe with its mild flow, significantly warming the climate of that region; at the same time, this ocean current brought copious moisture to the Arctic region, dramatically increasing snowfall and, in concert with other factors, precipitating the Pleistocene Ice Age. Indeed, current geologic evidence indicates that the Isthmus of Panama blocked the Atlantic-Pacific seaway between 3.5 and 3.0 MYA and that the Pleistocene Ice Age began 2.2 MYA.
Finally, when Panama joined North and South America, flora and fauna from those Continents began to mix. Armadillos, opossums and tapirs spread northward into Central America while rhinos, llamas and other northern species moved into South America. Among these migrants were human beings, which crossed from Siberia into North America about 20,000 years ago (via the Bering Land Bridge) and had colonized South America before the last Pleistocene Ice Sheets retreated into Canada, some 12,000 years ago.