

The Witwatersrand Gold Rush, which began in 1886, also increased the economic development of the city in the late 19th and early 20th centuries as Lourenço Marques served as the closest seaport for the export of gold from South Africa. In 1895, the opening of the NZASM railroad to Pretoria, South Africa, caused the city's population to grow.

A city since 1887, it superseded the Island of Mozambique as the capital of Mozambique in 1898. A commission was sent by the Portuguese government in 1876 to drain the marshy land near the settlement, to plant the blue gum tree, and to build a hospital and a church. The growing importance of the Transvaal led, however, to greater interest being taken back in Portugal in the development of a port. In 1871, the town was described as a poor place, with narrow streets, fairly good flat-roofed houses, grass huts, decayed forts, and a rusty cannon, enclosed by a recently erected wall 1.8 metres (6 ft) high and protected by bastions at intervals. The Luso-British conflict for the possession of Lourenço Marques ended on the 24th of July 1875 with Patrice de MacMahon, the French President, ruling in favour of Portugal. On 9 December 1876, Lourenço Marques was elevated to the status of village, and on the 10 November 1887 it became a city.

The town developed around a Portuguese fortress completed in 1787. The existing town dates from about 1850, with the previous settlement having been entirely destroyed by the natives. The forts and trading stations that the Portuguese established, abandoned and reoccupied on the north bank of the river were all named "Lourenço Marques". They explored the lower courses of the rivers emptying their waters into Delagoa Bay, notably the Espírito Santo. On the northern bank of Espírito Santo Estuary of Delagoa Bay, an inlet of the Indian Ocean, Lourenço Marques was named after the Portuguese navigator who, with António Caldeira, was sent in 1544 by the governor of Mozambique on a voyage of exploration.
