After Paraguay became independent, significant change occurred in Asunción. Under the rule of Gaspar Rodríguez de Francia (in office 1813–1840) roads were built throughout the city and the streets were named. However, during the presidency of Carlos Antonio López (President 1844–1862) Asunción (and Paraguay) saw further progress as the new president implemented new economic policies. More than 400 schools, metallurgic factories and the first railroad service in South America were built during the López presidency. After López died (1862), his son Francisco Solano López became the new president and led the country through the disastrous Paraguayan War that lasted for five years (1864–1870). On 1 January 1869, the capital city Asunción fell to Brazilian forces led by Gen. João de Souza da Fonseca Costa. After the end of the armed conflict, Brazilian troops occupied Asunción until 1876.