Salvador's Ladeira da Barra neighborhood. Mistreatment of the Tupinambá by the settlers caused them to turn hostile and the Portuguese were forced to flee to Porto Seguro . An attempted restoration of the colony the next year ended in shipwreck and cannibalism. The present city was established as the fortress of da Bahia de ("Saint Savior of the Bay of All Saints") in 1549 by Portuguese settlers under Tomé de Sousa, Brazil's first governor-general. It is one of the oldest cities founded by Europeans in the Americas. From a cliff overlooking the Bay of All Saints, it served as Brazil's first capital and quickly became a major port for its slave trade and sugarcane industry. Salvador was long divided into an upper and a lower city, divided by a sharp escarpment some high. The upper city formed the administrative, religious, and primary residential districts while the lower city was the commercial center, with a port and market. In the Roman Catholic Church, Brazil and the rest of the Portuguese Empire were initially administered as part of the Diocese of Funchal in Portugal but, in 1551, Salvador became the seat of the first Roman Catholic diocese erected in Brazil. The first parish church was the mud-and-thatch Church of Our Lady of Help () erected by the Jesuits (Society of Jesus), which served as the first cathedral of the diocese until the Jesuits finished construction of the original basilica on the Terreiro de Jesus in 1553. Its bishop was made independent of the Archdiocese of Lisbon at the request of King Pedro II in 1676; he served as the primate of the Congo and Angola in central Africa until the elevation of the Diocese of Luanda on 13 January 1844 and its bishop still serves as the national primate and premier see (diocese) of Brazil. In 1572, the Governorate of Brazil was divided into the separate governorates of Bahia in the north and Rio de Janeiro in the south. These were reunited as Brazil six years later, then redivided from 1607 to 1613. By that time, Portugal had become temporarily united with Spain and was ruled from Madrid by its kings. In 1621, King Philip III replaced the Governorate of Brazil with the states of Brazil, still based in Salvador and now controlling the south, and the Maranhão, which was centered on São Luís and controlled what is now northern Brazil. As