An army commanded by Caxias crossed into Uruguay in September 1851. The allies decided to divide their forces into two armies: a multinational force that included a single Brazilian division, and a second army composed entirely of Brazilians under Caxias. Against the wishes of Honório Hermeto, Caxias chose Manuel Marques de Sousa (later Count of Porto Alegre) to lead the former force. Caxias met and befriended Marques de Sousa, who had served under his command in the War of the Ragamuffins, during his trip to Rio Grande do Sul in 1839. The Brazilian division, led by Marques de Sousa, along with Uruguayan and Argentine rebel troops, invaded Argentina. On 3 February 1852, in the Battle of Caseros, the allies defeated an army led by Rosas, who fled to the United Kingdom, thus ending the war. Caxias spent 17 January aboard the frigate "Dom Afonso" alongside John Pascoe Grenfell, taking stock of the port area of Buenos Aires, the Argentine capital, selecting the best place to launch an amphibious attack. His plan was aborted once the news of the victory at Caseros arrived. As a reward for his role in the victory, Caxias was promoted to lieutenant general on 3 March, and raised to marquis on 26 June.