Cultivated peanuts (A. hypogaea) arose from a hybrid between two wild species of peanut, thought to be A. duranensis and A. ipaensis. The initial hybrid would have been sterile, but spontaneous chromosome doubling restored its fertility, forming what is termed an amphidiploid or allotetraploid. Genetic analysis suggests the hybridization may have occurred only once and gave rise to A. monticola, a wild form of peanut that occurs in a few limited locations in northwestern Argentina, or in southeastern Bolivia, where the peanut landraces with the most wild-like features are grown today. and by artificial selection to A. hypogaea.
The process of domestication through artificial selection made A. hypogaea dramatically different from its wild relatives. The domesticated plants are bushier and more compact, and have a different pod structure and larger seeds. From this primary center of origin, cultivation spread and formed secondary and tertiary centers of diversity in Peru, Ecuador, Brazil, Paraguay, and Uruguay. Over time, thousands of peanut landraces evolved; these are classified into six botanical varieties and two subspecies (as listed in the peanut scientific classification table). Subspecies A. h. fastigiata types are more upright in their growth habit and have shorter crop cycles. Subspecies A. h. hypogaea types spread more on the ground and have longer crop cycles.
The oldest known archeological remains of pods have been dated at about 7,600 years old, possibly a wild species that was in cultivation, or A. hypogaea in the early phase of domestication. They were found in Peru, where dry climatic conditions are favorable for the preservation of organic material. Almost certainly, peanut cultivation antedated this at the center of origin where the climate is moister. Many pre-Columbian cultures, such as the Moche, depicted peanuts in their art. Cultivation was well-established in Mesoamerica before the Spanish arrived. There, the conquistadors found the tlālcacahuatl (the plant's Nahuatl name) being offered for sale in the marketplace of Tenochtitlan. The peanut was later spread worldwide by European traders, and cultivation is now widespread in tropical and subtropical regions. In West Africa, it substantially replaced a crop plant from the same family, the Bambara groundnut, whose seed pods also develop underground. In Asia, it became an agricultural mainstay and this region is now the largest producer in the world.
In the English-speaking world, peanut growing is most important in the United States. Although it was mainly a garden crop for much of the colonial period, it was mostly used as animal feedstock until the 1930s. The United States Department of Agriculture initiated a program to encourage agricultural production and human consumption of peanuts in the late 19th and early 20th centuries.