On 1 November 1864, José Luís was appointed commander of the 2nd Division in the main Brazilian army, which by then was called the "Army of the South" and led by his uncle Field Marshal João Propício Mena Barreto (later Baron of São Gabriel). The Army of the South invaded Uruguay on 1 December. José Luís took part in the siege of the Uruguayan town of Paysandú, which fell on 2 January 1865. The Brazilian army and the allied Colorados force then besieged the Uruguayan capital, Montevideo. Before any attack upon the city could be launched, the Blancos capitulated, ending the conflict.