<P> Buenos Aires and Montevideo had successfully resisted two British invasions . The first one was in 1806, when a British army led by William Carr Beresford took control of Buenos Aires, until it was defeated by an army from Montevideo, led by Santiago de Liniers . The following year a bigger army took Montevideo, but failed to take Buenos Aires, being forced to surrender and leave both cities . There was no Spanish aid from Europe either time, and to prepare for the second invasion Liniers formed militias with Criollos, despite regulations prohibiting such militias . This gave them military power and political influence they did not have before, with the biggest Criollo army being the Patricios Regiment led by Cornelio Saavedra . This victory achieved without help also boosted confidence in independence, by showing that Spanish aid was not needed . The prestige earned by Buenos Aires before the other cities of the viceroyalty was exploited by Juan José Paso during the open cabildo to justify taking immediate action and hearing the opinions of other cities afterwards . </P> <P> By the ending of 1808 the whole Royal Family of Portugal left Europe, with the country being attacked by Napoleon, and settled in Brazil . The regent prince arrived with his wife, Charlotte Joaquina, daughter of Charles IV and sister of Ferdinand VII . When the news of the imprisonment of Ferdinand VII arrived in South America, Charlotte tried to take control of the viceroyalties as regent, a project known as Carlotism . She could do so due to the derogation of the salic law by Charles IV in 1789, and she intended to prevent a French invasion in the Americas . Some Criollos like Castelli, Beruti, Vieytes and Belgrano supported the project, considering it a chance to get a local government instead of one in Europe, or a medium for a later declaration of independence . Other Criollos like Moreno, Paso or Saavedra were critics of it, as well as most peninsular Spaniards and Viceroy Liniers . They suspected the whole project of concealing Portuguese ambitions in the region, and her public image wasn't positive: the people around her in Brazil (like the infant Pedro Carlos de Bourbon), and her relations with her husband, caused strong public dislike . Charlotte also rejected her supporters, as they intended her to lead a constitutional monarchy, while she wanted to retain an absolute monarchy . Britain, with strong presence in Portugal, also opposed the project: they did not want to let Spain, now allied with them against France, be split into many kingdoms, and did not consider Charlotte able to prevent separatism . </P>

What were the causes of the argentine revolution