
The earliest evidence of humans in Argentina is in Patagonia (Piedra Museo, Santa Cruz) and dates from 11,000 BC (Huarpes, Diaguitas and Sanavirones, among others). The Inca Empire, under King Pachacutec, invaded and conquered present-day northwestern Argentina in 1480, integrating it into a region called Collasuyu; the Guaraní developed a culture based on yuca, sweet potato and yerba maté. The central and southern areas (Pampas and Patagonia) were dominated by nomadic cultures, the most populous among them being the Mapuches.
European explorers arrived in 1516. Spain established the Viceroyalty of Peru in 1542 encompassing all its holdings in South America, and established a permanent colony at Buenos Aires in 1580 as part of the dependency of Río de la Plata. In 1776 this dependency was elevated to a viceroyalty which shifted trade from Lima to Buenos Aires.
The area was largely a country of Spanish immigrants and their descendants, known as criollos, and others of native cultures and of descendants of African slaves, present in significant numbers. A third of Colonial-era settlers gathered in Buenos Aires and other cities, others living on the pampas as gauchos, for instance. Indigenous peoples inhabited much of the rest of Argentina. The British unsuccessfully attempted two invasions between 1806 and 1807, during the Napoleonic Wars. The first one succeeded in taking control of Buenos Aires for a short time, being defeated by an army from Montevideo led by Santiago de Liniers. Liniers, who would be later promoted to viceroy, armed the whole population in order to resist a second invasion. In 1807 a new British army invaded Montevideo, but failed to capture Buenos Aires and returned Montevideo to Spanish command as part of the capitulation.
On 25 May 1810, after the rumors of the Napoleonic overthrow of Ferdinand VII were confirmed, the citizens of Buenos Aires created the First Government Junta (May Revolution). Two nations emerged in the former viceroyalty: the United Provinces of South America (1810) and the Liga Federal (1815). Other provinces delayed the formation of a unified state because of differences between autonomist and centralist parties; Paraguay seceded, declaring independence in 1811.
Between 1814 and 1817, General José de San Martín led a military campaign aimed at making independence a reality. San Martín and his regiment crossed the Andes in 1817 to defeat royalist forces in Chile and Perú, thus securing independence. The Congress of Tucumán gathered on 9 July 1816 and finally issued a formal Declaration of Independence from Spain. The Liga Federal was crushed in 1820 by the combined forces of the United Provinces and Portuguese-ruled colonial Brazil, and its provinces were absorbed into the United Provinces of South America. Bolivia declared independence in 1825, and Uruguay was created in 1828 as a result of a truce following the Argentina-Brazil War. The controversial truce led to the fall of the government of Bernardino Rivadavia and then the provinces worked as a confederation. This would later led to the rise of Buenos Aires provincial governor Juan Manuel de Rosas, who, as a federalist, exercised a reign of terror and kept the fragile confederation together.
The centralist Unitarios and the Federales maintained an internecine conflict until Rosas' 1852 overthrow after the Platine War. Justo José de Urquiza started that war to enforce the making of a national constitution, and after his victory the Constitution of Argentina was promulgated in 1853. The constitution, drafted by legal scholar Juan Bautista Alberdi, was defended by Franciscan Friar Mamerto Esquiú and endured through difficult early years. National unity was reinforced when Paraguayan dictator López attacked Argentina and Brazil in 1865, resulting in the War of the Triple Alliance, which left more than 300,000 dead and devastated Paraguay.