The Baía de Todos os Santos (All Saints Bay) was first encountered by the Portuguese and christianised in 1502. In 1501, one year after the arrival of Pedro Álvares Cabral's fleet in Porto Seguro, Gaspar de Lemos arrived at Todos os Santos Bay and sailed most of the Bahia coast. The first European man to disembark in Morro de São Paulo, however, was Martin Alfonso de Souza in 1531, leading an expedition to explore the coast of the new continent. In 1510 a ship with the Portuguese settler Caramuru was wrecked near the borough of Rio Vermelho. In 1534 Francisco Pereira Coutinho founded a town near the Barra borough, called Vila Velha, which means "Old town" in Portuguese. In 1549 a fleet of Portuguese settlers headed by Tomé de Sousa, the first Governor-General of Brazil, founded Salvador. Built on a high cliff overlooking All Saints Bay, Salvador was the first capital of colonial Brazil. It quickly became the main sea port and an important centre of the sugar industry and the slave trade.
Salvador is located on a small, roughly triangular peninsula that separates Todos os Santos Bay from the open waters of the Atlantic Ocean. The bay which got its name from having been discovered on All Saints' Day, forms a natural harbour. Salvador is a main export port, lying at the heart of the Recôncavo Baiano, a rich agricultural and industrial region encompassing the northern part of coastal Bahia. The landscape is diverse ranging from flat to hills and low mountains.
A particularly remarkable feature of Salvador is the escarpment that divides Salvador into the Cidade Alta ("Upper Town") and the Cidade Baixa ("Lower Town"), the former some 85 m (275 ft) above the latter. Originally, the upper city was the administrative and main religious area and it hosted the majority of the population. The lower city was the financial centre with the port and market. In the late 19th Century funiculars and an elevator (including the Elevador Lacerda constructed in 1873) were built to link the two part of the city.
The city became the seat of the first Catholic bishop of Brazil in 1552, and it is still a centre of Brazilian Catholicism. By 1583 there were 1,600 people residing in the city, and it quickly grew into one of the largest cities in the New World, surpassing any colonial American city at the time of the American Revolution in 1776. Salvador was the capital city of the Portuguese viceroyalty of Grão-Pará and its province of Bahia de Todos os Santos. The Dutch Republic captured and sacked the city in May 1624, and held it along with other North-East ports until it was conquered once again, this time by a large Spanish-Portuguese fleet.As mentioned, Salvador was the first capital of Brazil and remained it until 1763 when it was succeeded by Rio de Janeiro. In the 19th century the city became an important centre of the Brazilian independence movement and was attacked by Portuguese troops in 1812, before being liberated on July 2, 1823. It settled into graceful decline over the next 150 years, out of the mainstream of Brazilian industrialisation. It remains, however, a national cultural and tourist centre. By 1948 the city had a population of approximately 340,000 people, and was already Brazil's fourth largest city. In 2008 the population was 2,948,733, the third largest population of Brazil.