Argentina declared independence from Spain in 1816, when the Congress of Tucumán formally approved the declaration on July 9.
The declaration was made by representatives of the United Provinces of South America, the political entity that preceded modern Argentina. The congress met in San Miguel de Tucumán, partly because the city was farther from the royalist threat advancing from Upper Peru.
The immediate background was the May Revolution of 1810, which removed the Spanish viceroy after Napoleon’s intervention in Spain disrupted the monarchy. Independence was not declared immediately, however, because revolutionary leaders first struggled to organize a stable government and defend the territory against Spanish royalist forces.
A common mix-up is 1810: that year marks the beginning of Argentina’s revolutionary break from Spanish rule, not the formal declaration of independence. Spain did not officially recognize Argentine independence until 1857.