The prince was later acclaimed Dom Pedro I, the first Brazilian emperor, on 12 October. Those Brazilian and Portuguese forces who remained loyal to Portugal refused to accept this outcome, which led to a war fought on several fronts across Brazil. On 18 January 1823, Pedro I created the Emperor's Battalion, a handpicked elite infantry unit that included Luís Alves, who was named as adjutant to the company's commander, his uncle, Colonel José Joaquim de Lima e Silva. The Emperor's Battalion was sent to the province of Bahia in the northeast on 28 January and placed, along with other troops, under the command of French Brigadier Pierre Labatut. The Brazilian imperial forces besieged Bahia's capital, Salvador, which was held by the Portuguese. During the siege, Luís Alves fought in at least three attacks (on 28 March, 3 May and 3 June) against Portuguese positions around Salvador, all successful. In the engagement on 28 March, he led a charge on an enemy bunker. During the Bahia campaign, high-ranking officers mutinied against Labatut, who was taken prisoner and sent back to Rio de Janeiro. It is unlikely that Luís Alves was involved, but his uncle, Joaquim de Lima, was almost certainly part of the conspiracy and was chosen by the officers to replace Labatut. The campaign resumed, and the Portuguese withdrew from Salvador and set sail back to Portugal. On 2 July, the victorious Brazilians entered the city. The Emperor's Battalion returned to Rio de Janeiro, and Luís Alves was later promoted to captain on 22 January 1824. Cisplatine War and the abdication crisis 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). The war came to a disastrous end in 1828, as Brazil relinquished Cisplatina, which became the independent nation of Uruguay. Nonetheless, Luís Alves was promoted to the rank of major on 2 December 1828 and made second-in-command of the Emperor's Battalion in early 1829. During his stay in Montevideo,