Argentina declared its independence from Spain on July 9, 1816. This followed a six-year war for independence against the forces of the Spanish Viceroyalty of the Rio de la Plata that ruled over the southern half of South America.
Argentina's independence came at a time when Napoleon had successfully invaded and occupied Spain. Known as the Peninsular War, the French armies put the Spanish Empire under significant pressure at home, allowing colonies like Argentina to seize political power. Leaders like Jose San Martin were instrumental in overthrowing the Viceroy in May 1810, forming an administrative council known as a cabildo, which sought to rule the country from Buenos Aires.