In April, 1811, Belgrano, the chief general of Buenos Aires, arrived with re-enforcements. Shortly after, a Spanish detachment, which had reached the western part of Uruguay, was captured, and the gaucho leaders advanced almost to the walls of Montevideo. A force of one thousand Spaniards started out to meet them and, on the 18th of May, met with complete defeat at the battle of Las Piedras. For this victory Artigas was promoted by the Buenos Aires Junta, and became the greatest military figure on the patriot side. With a considerable army of gauchos from both banks of the Uruguay and of patriots from Buenos Aires he began a siege of Montevideo.
The siege, however, did not last long. The great expedition sent by the patriots to Bolivia was overwhelmingly defeated in the battle of Huaqui, and the Buenos Aires Junta, horribly alarmed for their own safety, ordered all the troops under their control to return and help defend that city. At the same time a Portuguese army advanced from Brazil with the avowed purpose of saving Montevideo from being lost to Spain, but really to take possession of Uruguay for King John's own benefit. Artigas was compelled to retire to the Argentine, and Uruguayan historians say that on his long retreat to the Uruguay River he was accompanied by practically the whole rural population of the country. The semi-nomadic habits of the gauchos made such a migration easy, and they quickly found new homes on the opposite shore in Entre Rios, whence it would be easy to return as soon as the Portuguese troops retired.
Considerations of international politics and English pressure compelled King John to withdraw his troops from Uruguay in the middle of the year 1812, and the Buenos Aires government immediately began to assemble an army on the right bank of the Uruguay. Artigas was still encamped with his Uruguayan forces in the same neighbourhood, and although he held an Argentine commission he was virtually independent. The Argentine army, under the command of José Rondeau, who in colonial days had been captain of guerrillas alongside Artigas, advanced against Montevideo, and on the last day of 1812 won the bloody battle of Cerrito, in sight of the city, and shut the Spaniards up within its walls. Artigas followed and assisted in the siege, but he refused to unite his forces with those of Rondeau until his own claims should be recognised and his demands complied with. He assumed a dictatorship and sent delegates to Buenos Aires to advocate the formation of a federal republic, of which Buenos Aires was to be simply one member. Buenos Aires refused to receive his delegates, and civil war broke out. Rondeau adhered to the Buenos Aires interest; and after a year of disputes, in the beginning of January, 1814, Artigas withdrew his own followers from Montevideo, leaving the partisans of Buenos Aires to continue the siege alone. In May the celebrated Irish admiral, William Brown, destroyed the Spanish fleet, which had hitherto dominated the Plate. Montevideo's communications with both land and sea were shut off, and the fortress shortly afterwards surrendered to General Carlos Alvear, the Argentine general who was then commanding the besieging forces.