By 1809, the idea of independence spread through Upper Peru as in several other nations throughout Spanish America. In May 1810, a revolution occurred in Buenos Aires which controlled the territory of Upper Peru and led to the Argentine War of Independence led by General José de San Martín. This led to the creation of a guerrilla warfare in 1811 in Upper Peru known as the War of the Republiquetas. The guerrilla fighters were eventually defeated by royalist forces.