Argentina became an independent nation during the Peninsular War, a conflict between the First French Empire and the Spanish Empire. Argentina was a Spanish territory by that time, as the Viceroyalty of the Río de la Plata, and thus at war with France, but the war never left Europe. The Viceroyalty was never attacked directly by French armies. The French attack to Spain indirectly started the Argentine War of Independence. France recognized Argentina as an independent nation by the end of 1830.