sought to prevent the expansion of the new ideas across its territories, but many criollos came into contact with them during their university studies, either at the University of Chuquisaca or at Spain itself. Both in Spain and the Americas, people longed for a new type of government, such as a constitutional monarchy. The ill-fated British invasions of the Río de la Plata set a precedent in weakening the monarchic authority. The viceroy, Rafael de Sobremonte, fled to Córdoba during the conflict, but could not return to Buenos Aires after the liberation: an open cabildo gave Santiago de Liniers (who led the Spanish forces in the conflict) the military authority over the city, while it prepared for a British counter-attack, and ordered Sobremonte to stay out. Liniers was later appointed viceroy and this appointment was confirmed by the Spanish king afterwards. This was the first time that the viceroy was deposed by local institutions, and not by the Spanish king himself. Power vacuum The 1808 Peninsular War was triggered by an event of huge political weight: the king of Spain, Ferdinand VII, was captured and imprisoned by the French armies of Napoleon. The Supreme Central and Governing Junta of the Kingdom claimed sovereignty, and waged the war against the French. The viceroyalty was then divided in political factions with different political opinions about the legitimacy of the Junta. Conservatives thought that, in political terms, the Junta should be acknowledged as the king would be, and the remainder of the political organization of the Spanish Empire should stay unchanged. A group influenced by the French ideas instead thought that the Junta lacked the king's authority and each province should be free to appoint their own government Junta. The first one to take this ideas into action was Francisco Javier de Elío, governor of the Banda Oriental, with an enmity with viceroy Liniers. Elío appointed himself as the head of a Junta in Montevideo, thus acting with autonomy from Liniers. However, he did not declare the independence of the Banda Oriental, nor rejected completely Liniers' authority. He was allied with Martín de Álzaga in Buenos Aires, who organized a mutiny against Liniers. His project was to replace Liniers with a Junta, ruling nominally in the name of Ferdinand VII, and declare independence once Spain was completely invaded by the French forces. The mutiny, however, was defeated by military bodies supporting Liniers, who