Over the course of nearly 15 centuries, pre-Inca cultures settled along the Peruvian coast and highlands. By the 1st century B.C., during what is known as the Formative or Initial Period, Andean society had created sophisticated irrigation canals and produced its first textiles and decorative ceramics. Another important advance was labor specialization, aided in large part by the development of a hierarchical society.

Though Peru is likely to be forever synonymous with the Incas, who built the spectacular city of Machu Picchu high in the Andes, that society, in place when the Spanish conquistadors arrived at the end of the 15th century, was merely the last in a long line of pre-Columbian cultures. The Inca empire (1200-1532) was short lived, but it remains the best documented of all Peruvian civilizations. The Incas' dominance was achieved through a formidable organization and highly developed economic system. They laid a vast network of roadways nearly 30,000km (18,600 miles) total across the difficult territory of the Andes, connecting cities, farming communities, and religious sites. Their agricultural techniques were exceedingly skilled and efficient, and their stonemasonry remains unparalleled.

By the 1520s, the Spanish conquistadors had reached South America. Francisco Pizarro led an expedition along Peru's coast in 1528. Impressed with the riches of the Inca empire, he returned to Spain and succeeded in raising money and recruiting men for a return expedition. In 1532, Pizarro made his return to Peru overland from Ecuador. After founding the first Spanish city in Peru, San Miguel de Piura, near the Ecuadorian border, he advanced upon the northern highland city of Cajamarca, an Inca stronghold. There, a small number of Spanish troops -- about 180 men and 30 horses -- captured the Inca emperor Atahualpa. The emperor promised to pay a king's ransom of gold and silver for his release, but the Spaniards, having received warning of an advancing Inca army, executed the emperor in 1533. It was a catastrophic blow to the Inca empire.

Two years later, Pizarro founded the coastal city of Lima, which became capital of the new colony, the viceroyalty of Peru. The Spanish crown appointed Spanish-born viceroys the rulers of Peru, but Spaniards battled among themselves for control of Peru's riches, and the remaining Incas continued to battle the conquistadors. Pizarro was assassinated in 1541, and the indigenous insurrection ended with the beheading of Manco Inca, the last of the Inca leaders, in 1544. The Inca Tupac Amaru led a rebellion in 1572, but he met the same fate. Over the next 2 centuries, Lima gained in power and prestige at the expense of the old Inca capital of Cusco and became the foremost colonial city of the Andean nations.

By the 19th century, grumbling over high taxes and burdensome Spanish controls grew in Peru. After liberating Chile and Argentina, José de San Martín set his sights north on Lima in 1821 and declared it an independent nation the same year. Simón Bolívar, the other hero of independence on the continent, came from the other direction. His successful campaigns in Venezuela and Colombia led him south to Ecuador and finally to Peru. Peru won its independence after crucial battles in late 1824.

After several military regimes, Peru finally returned to civilian rule in 1895. Landowning elites dominated this new "Aristocratic Republic." In 1941, the country went to war with Ecuador over a border dispute (just one of several long-running border conflicts). Though the 1942 Treaty of Rio de Janeiro granted the area north of the Marañón River to Peru, Ecuador would continue to claim the territory, part of the Amazon basin, until the end of the 20th century.

Peru's recent political history has been a turbulent mix of military dictatorships, coups d'état, and several disastrous civilian governments, engendering a near-continual cycle of instability. The country's hyperinflation, nationwide strikes, and two guerrilla movements -- the Maoist Sendero Luminoso (Shining Path) and the Tupac Amaru Revolutionary Movement (MRTA) -- produced violence and terror throughout the late 1980s and early 1990s. Meanwhile, Peru's role on the production end of the international cocaine trade grew exponentially.

With the economy in ruins and the government in chaos, Alberto Fujimori, the son of Japanese immigrants, became president in 1990. Fujimori promised to fix the ailing economy and root out terrorist guerrillas, and in 1992, his government succeeded in arresting key members of both the MRTA and the Shining Path, catapulting the president to unprecedented popularity. Fujimori's strong-arm tactics became suddenly authoritarian, however, shutting down Congress in 1992, suspending the constitution, and decreeing an emergency government (which he effectively ruled as dictator). Still, Fujimori was reelected in 1995.

Most international observers denounced Peru's 2000 presidential election results, which were announced after Fujimori's controversial runoff with Alejandro Toledo, a newcomer from a poor Indian family. Public outcry forced Fujimori to call new elections, but he escaped into exile in Japan and resigned the presidency in late 2000 after a corruption scandal involving his shadowy intelligence chief, Vladimiro Montesinos. Toledo, a former shoeshine boy and son of an Andean sheep herder who went on to teach at Harvard and become a World Bank economist, won the election and became president in July 2001, formally accepting the post at Machu Picchu.

Peru Today -- Peru remains a society dominated by elites. Toledo had labeled himself an "Indian rebel with a cause," alluding to his intent to recognize and his support for the nation's Native Andean populations, or cholos. Yet Toledo's once-hopeful program Perú Posible did not achieve the results Peruvians had hoped for; his government was mired in corruption and nepotism. Farmers and teachers on strike repeatedly paralyzed Peru, forcing Toledo to declare a national state of emergency. The president limped to the end of his term in 2006.

The Peruvian economy has expanded steadily in the last decade. Former president Alan García -- who had also fled Peru after a disastrous term in the 1980s -- improbably returned from exile and won the presidency in 2006. A one-time populist, García has positioned himself as a centrist, seeking to put a clamp on inflation and pursuing free-market policies. Most notably, he pushed for a free-trade agreement with the United States, a treaty that was ratified by the U.S. Congress in December 2007 (and which entered into force in February 2009). The Peruvian economy recorded a robust growth rate of 9.2% in 2008, a 15-year high and one of the most impressive in the world, and to date the García presidency (which runs until 2011) has been largely stable and peaceful. The pace of growth dropped by half in 2009, though, and the divide between rich and poor, coastal elites and indigenous highlanders, and modern and traditional continues to loom large.