The Portuguese garrison in Montevideo, the capital of Cisplatina (then Brazil's southernmost province), was the last to surrender. In 1825, secessionists in the province rebelled. The United Provinces of the Río de la Plata (later Argentina) attempted to annex Cisplatina. Brazil declared war, triggering the Cisplatine War. The Emperor's Battalion, to which Luís Alves was attached, was sent to guard Montevideo, then besieged by rebel forces. Luís Alves fought in engagements against the insurgents during 1827 (7 February, 5 July, 7 July, 14 July, 5 August and 7 August).