Salvador lies on a small, roughly triangular peninsula that separates the Bay of All Saints, the largest bay in Brazil, from the Atlantic Ocean. The first European to settle nearby was Diogo Álvares Correia("Caramuru"), who was shipwrecked off the end of the peninsula in 1509. In 1534, Francisco Pereira Coutinho, the first captain of Bahia, established the settlement of Pereira in modern 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 c. 1546. An attempted restoration of the colony the next year ended in shipwreck and cannibalism. The present city was established as the fortress of São Salvador da Bahia de Todos os Santos in 1549 by Portuguese settlers 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. 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 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. In 1763, the colonial administration was removed to Rio de Janeiro and elevated to a viceroyalty. Salvador remained the heart of the Recôncavo, Bahia's rich agricultural maritime district, but was largely outside Brazil's early modernization. The area formed a center of royal Portuguese support against heir apparent Pedro I's declaration of independence from European Portugal on September 7, 1822. Its elites initially remained loyal to the Portuguese crown while rebels from Cachoeira besieged them for a year until finally receiving Portugal's surrender of the town on July 2, 1823, which is now celebrated as Bahia Independence Day. Owing to whales' use of the Bay of All Saints as a mating ground, Salvador became a large whaling port in the Southern Hemisphere during the 19th century but the trade had already begun to fall off by the 1870s. Under the empire and republic periods, however, the town slowly began to industrialize. In 1873, Brazil's first elevator, the powerful hydraulic Elevador Lacerda, was constructed to connect the city's upper and lower towns.Having undergone several upgrades, it continues in use. By the First World War, it was joined by a second elevator and Salvador was connected to four railroads: the Bahia & Alagoinhas to Joazeiro, the Bahia Central, the Nazareth Tramway, and a short line to Santo Amaro. Its central districts and the major suburbs of Bomsim and Victoria were served by four streetcar lines, which had begun to electrify. It also served as a port of call for most steamship lines trading between Europe and South America. In 1985, UNESCO listed the city's Pelourinho neighborhood as a World Heritage Site. In the 1990s, a major municipal project cleaned and restored the neighborhood in order to develop it as the cultural center and heart of the city's tourist trade. The development of the Historical Center, however, involved the forced removal of thousands of working-class residents and now necessitates local and municipal events in order to attract people to the area. The relocated workers, meanwhile, have encountered significant economic hardship in their new homes on the city's periphery, separated from access to work and civic amenities. In 2007, Porto da Barra Beach in Barra was named by the British Guardian newspaper as the 3rd-best beach in the world. The city hosted the 2013 Confederations Cup and was one of the host cities of the 2014 FIFA World Cup in Brazil at its Arena Fonte Nova. As part of its preparations for the World Cup, and the Olympic Games the city reëstablished its public transportation lines as the Salvador Metro with further funding having taken place in the infrastructure and has now plans to extend the railway a further 30’stations and to construct a 6 lane road bridge to the island of an Itaparica island to the south.