Gueneche now in turn took the aggressive, and, advancing, he crushed the revolution at Cochabamba, and now prepared his forces for serious invasion. These reverses of fortune were not sufficient to discourage the ardour of the inhabitants of Buenos Aires. For that the idea of independence had become too strongly engrafted in the young nation; and on February 18, 1812, the blue and white of the Argentine flag was decided upon to the sound of enthusiastic acclamations.

A month later Belgrano took over the command of the army in Peru in order to make a stand against the threatened invasion. In the first place he found caution necessary. The Royalists, flushed with victory, had recaptured the towns of Salta and Jujuy, and Belgrano retired for a while in the face of their advances. The forces under the Spanish General, Tristán, followed him.

This was Belgrano's opportunity. Falling upon the Royalist army, he completely defeated it in a battle at Tucumán, and the Spaniards suffered a heavy loss in men and munitions of war. Belgrano, then in turn advanced and made once again for Salta. In the neighbourhood of this town the Argentine flags were carried into battle for the first time, and their presence was welcomed as a favourable omen, for the victory remained with the patriot forces. Belgrano showed himself generous as a victor by liberating the great majority of his prisoners on parole, which, it is regrettable to state, large numbers of the Spaniards broke.

This victory completely changed the situation in the south-east. The patriots were enabled to resume the aggressive; their armies were sent across once more into Uruguay, and Montevideo was again besieged.

In the meanwhile a certain amount of rivalry had made its appearance among the intellectual patriot leaders in Buenos Aires. The rival parties were headed respectively by Saavedra and Mariano Moreno. Moreno eventually retired from the junta, and was offered the post of Minister Plenipotentiary to Great Britain. This he accepted, but died on his voyage to Europe. The party he had formed, however, continued in being after his death under the name of Morenistas. The period, of course, was one of experiment, and just at this moment numerous forms of government were essayed, and the pattern of the constitution frequently changed.

On March 9, 1812, occurred an important event in the history of Argentina. On that date José de San Martin arrived in Buenos Aires in the British frigate George Canning. With him came Carlos Alvear and Matias Zapiola, whose names were likewise destined to become famous in the annals of the Republic. On their arrival there was established in Buenos Aires a branch of the now important secret society originally founded in London, the "Gran Reunion Americana." This branch was christened the "Logia de Lautaro," and exercised much influence on the affairs of the revolution.

San Martin was empowered by the Government to raise a force of horse-grenadiers, which subsequently became famous. In this regiment was Alvear in the capacity of Sargento Mayor, and Zapiola as Captain. There was plenty of work for the newly-constituted forces. San Martin's regiment was employed, in the first place, in the endeavour to restrain the river-raiding expeditions which the Royalist fleet was undertaking from its base at Montevideo. The mischief effected by these incursions to the patriot forces was very great. On February 3, 1813, however, San Martin dealt the Spaniards a severe blow in the neighbourhood of Rosario. Here he surprised a landing-party and defeated it utterly. This was San Martin's first victory, and it very nearly proved his last, for he had his horse shot under him and all but lost his life.

While this was going on in Argentina, the fortunes of war in Peru had again veered from a favourable to a perilous condition. On October 1, 1813, the Argentine army was badly defeated at Vilcapuyo, and in the same year it was again defeated at Ayouma. On this the Spaniards, seeing that their star was again in the ascendant, resumed possession of Chuquisaca and Potosi.

San Martin was now sent to take charge of operations in Peru. On the Argentine side the campaign had in one sense degenerated, since the diminished numbers of the Republican forces now restricted them to guerilla fighting. This species of warfare, as a matter of fact, suited the hardy Argentines admirably, and under such brilliant leaders as Martin Guëmes, Ignacio Warnes, and Juan Antonio Alvarez de Arenales, their feats had kept the Royalist forces fully occupied. San Martin, on his arrival, immediately realized the advantages of this species of resistance, and encouraged it to the utmost. By this means alone was an invasion staved off.

At the beginning of 1814 Montevideo was still in the hands of the Spaniards, who continued to command the estuary of the River Plate and the great river system generally. Ominous news arrived from Europe. An important Royalist expedition, it appeared, was being prepared in Spain. The outlook for the patriots was serious. A Council of State was called in Buenos Aires, consisting of nine members, of which Alvear was the most prominent. It was agreed that, so long as the Spanish fleet commanded the home waters, there was very little chance of driving their garrisons from the ports. It was resolved to establish a patriot fleet, which should sweep the seas clear of the Royalist vessels.