When Prince Pedro proclaimed the independence of Brazil in 1822, he decided to keep Rio de Janeiro as the capital of his new empire. Rio continued as the capital of Brazil after 1889, when the monarchy was replaced by a republic. Until the early years of the 20th century, the city was largely limited to the neighbourhood now known as the historic city centre (see below), on the mouth of Guanabara Bay. The city’s centre of gravity began to shift south and west to the so-called Zona Sul (South Zone) in the early part of the 20th century, when the first tunnel was built under the mountains between Botafogo and the neighbourhood that is now known as Copacabana. Expansion of the city to the north and south was facilitated by the consolidation and electrification of Rio’s streetcar transit system after 1905.