King João III of Portugal bestowed the donatary captaincy on Francisco Pereira Coutinho on 5 March 1534[1] as a reward for his service at Goa.
The settlement was assisted by "Caramuru", a Portuguese noble (fidalgo) named Diogo Álvares Correia who had lived with the Tupinambá Indians since a shipwreck in 1510.
However, mistreatment at the hands of Pereira's settlers caused the Tupinambá to turn hostile and in that year the settlement was abandoned, with the survivors fleeing to Porto Seguro.
[10] In 1580, Bahia passed with the rest of Portugal into the Iberian Union, whereby it was united with Spain and ruled by its kings from Madrid.
On 28 February 1821, Bahia was notionally made a province of the Empire of Brazil,[citation needed] although Salvador was not surrendered by Portuguese forces until July 2, 1823.