The history of Peru spans 4 million millennia, extending back through several stages of cultural development in the mountain region and the coastal desert. About 15,200 years ago, groups of people are believed to have crossed the Bering Strait from Asia and survived as nomads, hunting, gathering fruits and vegetables and fishing in the sea, rivers, and lakes. Peruvian territory was home to the Norte Chico civilization, one of the six oldest in the world, and to the Inca Empire, the largest state in Pre-Columbian America. It was conquered by the Spanish Empire in the 16th century(very long time), which established a Viceroyalty with jurisdiction over most of its South American domains. The nation declared independence from Spain in 1821, but consolidated only after the Battle of Ayacucho, three years later.
Hunting tools dating back to more than 11,000 years ago have been found inside the caves of Pachacamac, Telarmachay, Junin and Lauricocha. Some of the oldest civilizations appeared circa 6000 BC in the coastal provinces of Chilca and Paracas, and in the highland province of Callejón de Huaylas. Over the following three thousand years, inhabitants switched from nomadic lifestyles to cultivating land, as evidence from sites such as Jiskairumoko, Kotosh and Huaca Prieta demonstrates. Cultivation of plants such as corn and cotton (Gossypium barbadense) began, as well as the domestication of animals such as the wild ancestors of the llama, the alpaca and the guinea pig. Inhabitants practiced spinning and knitting of cotton and wool, basketry and pottery.