The first inhabitants of Peru were nomadic hunter-gatherers who lived in caves in Peru's coastal regions. The oldest site, Pikimachay cave, dates from 12,000 BC. Crops such as cotton, beans, squash and pepper chillis were planted around 4000 BC; later, advanced cultures such as the ChavÃn introduced weaving, agriculture and religion to the country. Around 300 BC, the ChavÃn inexplicably disappeared, but over the centuries several other cultures - including the Salinar, Nazca, Paracas Necropolis and Wari (Huari) - became locally important. By the early 15th century, the Inca empire had control of much of the area, even extending its influence into Colombia and Chile.
Between 1526-28, the Spanish conquistador Francisco Pizarro explored Peru's coastal regions and, drawn by the riches of the Inca empire, returned to Spain to raise money and recruit men for another expedition to the country. Return he did, marching into Cajamarca, in northern Peru, before capturing, ransoming and executing the Inca emperor Atahualpa in 1533. Pizarro subsequently founded the city of Lima in 1535 but was assassinated six years later. The rebellion of the last Inca leader, Manco Inca, ended ingloriously with his beheading in 1572.
The next 200 years proved peaceful, with Lima becoming the major political, social and commercial center of the Andean nations. However, the exploitation of Indians by their colonial masters led to an uprising in 1780 under the self-styled Inca Tupac Amaru II. The rebellion was shortlived and most of the leaders were rounded up and executed. Peru continued to remain loyal to Spain until 1824, when the country was liberated by two 'outsiders': the Venezuelan SimÃ³n BolÃvar and the Argentinian JosÃ© de San MartÃn. In 1866, Peru won a brief war with Spain but was humiliated by Chile in the War of the Pacific (1879-83), which resulted in the loss of lucrative nitrate fields in the northern Atacama Desert. Peru also went to war with Ecuador over a border dispute in 1941. The 1942 treaty of Rio de Janeiro ceded the area north of the RÃo MaraÃ±Ã³n to Peru but the decision was fiercely contested by Ecuador.
Cuban-inspired guerrilla uprisings in 1965 led by the National Liberation Army were unsuccessful, but a series of nationwide strikes coupled with a violent insurgency by the Maoist Shining Path (Sendero Luminoso) guerrillas caused political instability in the 1980s. Another guerilla group - the Tupac Amaru Revolutionary Movement (MRTA) - also gained in strength during this time. However, the 1990 presidential election victory of Alberto Fujimori (erroneously known as El Chino because of his Japanese parentage) over Peruvian novelist Mario Vargas Llosa, and the capture in 1992 of inspirational MRTA and Sendero Luminoso leaders buoyed hopes for a sustained period of peace.
The main threat to domestic stability remains unemployment and poverty, despite Peru's fast-growing economy. Fujimori was re-elected in April 1995, comprehensively beating former UN secretary general Javier Perez de Cuellar. A treaty was signed with Ecuador in 1998, peacefully resolving a contentious 57-year-old border dispute, paving the way for increased foreign investment in both countries. In November 1999, Peru and Chile settled their last long-standing territorial dispute over the important trade bottleneck of Arica.
The world watched the April 2000 elections intently as Alejandro Toledo, an Andean Indian from a poor family who became a World Bank economist, gave two-time President Alberto Fujimori the election run of his life. One week before the country headed to the polls for a second time, Toledo filed a formal letter with the National Election Board to further call attention to election corruption, a move that bought a response from the Organization of American States (OAS). It announced that the National Election Office needed more time to correct 'deficiencies' in the voting process. Toledo instructed his followers to write 'No To Fraud' across their ballots and ultimately withdrew from the runoff.
Fujimori emerged victorious in that controversial and rigged election. However, he resigned from his third presidential term in November and fled to Japan following charges of human rights violations and corruption that were made against his intelligence adviser, Vladimiro Montesinos.