Bahia gains independence, ending Portuguese rule in Brazil

Control of the province was disputed in several battles, mostly in Pirajá, before the Portuguese were fully expelled on 2 July 1823. Bahia became a Brazilian state in 1889.