This article is part of the history of rail transport by country series

The history of rail transport in Bolivia began in the 1870s after almost three decades of failed efforts to build railroads to integrate the country, mining was the driving force for the construction of railways. The need to transport saltpeter to the coast triggered the first railway lines in Bolivia. It was the silver mining, however, that drove the construction of a railway from the Pacific coast to the high plateau during the nineteenth century. Later, at the beginning of the twentieth century, tin mining gave a new impetus to railway building, forming what is now known as the Andean or Western network. The eastern network, on the other hand, developed between the years 1940 and 1960 and is financed in exchange for oil through agreements with Argentina and Brazil. Bolivia being a landlocked country, the railways played a fundamental role and the history of its railroads is the history of the country's efforts to reach first ports on the Pacific coast and then the Atlantic.

Five phases can be distinguished in the history of the railways of Bolivia: 1870–1900: Silver mining companies built their own railways for ore transport. 1900 and 1930: The greatest expansion, financed by foreign investment. In this period connections were made with Peru and Argentina, as well as between the Bolivia's main cities of the high plateau and valleys forming the Western network. 1930–1964: Increasingly independent operations by foreign railway companies, mining companies and state railways. After 1940, government policy gave priority to the roads over railways. Nevertheless, railways are constructed to Argentina and Brazil creating Eastern network. 1964–1966: Nationalization of the railways, the creation of the (ENFE) in 1964 with a policy role in the development of the country. 1997–2013: The privatization of the railways through the process.

Origin The origins of Bolivia's railways go back to the 1840s, when the need to transport higher volumes of saltpeter began to be a problem for the future development of nitrate exploitation. Some examples of the first failed efforts in 1856 were the call for a tender to build the Cobija–Calama railroad by President Córdova and the agreement between Peru and Bolivia to unite Tacna and La Paz with the "camino lane". In 1867, it was agreed to construct the Cobija–Aduana Nacional railway, a year later the construction of a Cobija–Potosí railroad was approved, and in 1869 authorization was given for the construction of the La Paz–Aigachi railway. However, none were successful. For a complete list of railway projects and the legislation that was approved to carry them out see. On the other hand, the introduction of railways, also known as "railway of mines", to facilitate the transportation of ore in wagons to the interior and exterior of the mine first worked in Karwayqullu (Quijarro, Potosí) from 1853.

First phase (1870–1899)

The railroads arrived in Bolivia driven by economic interests associated with raw material exports, first of saltpeter and later of silver. The Anglo-Chilean Company of Salitres and Ferrocarril de Antofagasta built the first railroad lines in 1873 from the Salar del Carmen to Antofagasta.First 36 km to Salar El Carmen was built in December 1873 and then the line was extended to Salinas. The use of this route to transport merchandise not associated with the Antofagasta Salting and Railroad Company was a source of tension between the Bolivian government and the Company due to the government's fear that this railroad would compete with the projects it planned to carry out. . See also . In 1879 the Pacific War broke out, after which Chile occupied the region of Antofagasta, which became incorporated into Chile after the signing of the 1884 and the treaty of 1904.

In 1885, the Huanchaca Company of Bolivia and the Salitres and Ferrocarril de Antofagasta signed a contract to extend the line of the port to the establishments of the mining company. According to this agreement, the Company of Salitres supplied equipment and machinery and the Huanchaca Company would deliver 2.6 million pesos. Once at the border, a new company would be formed, totally independent, with preferential rates for the Huanchaca Company. In 1886 the railroad arrived in Calama, very close to the new frontier, which aroused great opposition in Bolivia, considering it more of military than commercial interest. Despite this, the government of Gregorio Pacheco (1884–1888) approved the extension of the railway line from Ascotán to Oruro by law of 19 July 1887. However, when the railway arrived at the border in 1887, the companies did not reach an agreement. To resolve the situation, the Huanchaca Company purchased the railway rights using a loan from English investors. On this basis, The Antofagasta (Chili) Bolivia Railway Co. Ltd. was organized in London on 28 November 1888. In 1889 the Antofagasta–Uyuni section (612 km) was concluded at a cost of £2.2 million. Huanchaca built the Pulacayo–Uyuni branch (36 km) and the Pulacayo–Huanchaca line (12 km) with a tunnel of almost 3 km. In 1892, the line was extended from Uyuni to the city of Oruro (925 km).

The Antofagasta–Oruro railway took over the Bolivian foreign trade that had traditionally passed through Salta, Argentina, but also enabled imported flour to displace the flour produced in Cochabamba in the markets of La Paz and Oruro and imported sugar to replace the sugar produced traditionally in Santa Cruz and sold in the markets of Potosí.

For the mining industry, railways made it possible to reduce the cost of inputs (especially fuel) and increase export volumes by making it competitive to transport ore with lower silver content. For the Huanchaca Mining Company, the connection of the railway to its works contributed to an increase of 87% in average production between the period 1882–1888 and 1889–1895. In the words of the historian Antonio Mitre, "The railroad, at the same time as prolonged the duration of the silver boom in the nineteenth century, began the tin age in the twentieth century."

Second phase (1900–1929)

Just under half of Bolivia's current rail network was built in the first quarter of the twentieth century. The increase in the construction of railways of the early twentieth century was necessary for the political survival of liberals and republicans. The railroads then had a halo of modernity and development that made them indispensable to any government program. They were perceived as a tool that would allow the colonization of vast territories and contribute to territorial integrity. In order to regulate the process of railway expansion, the government of Juan Misael Saracho promulgated of General Law of Railroads 3 October 1910.

The political and economic necessity of building railways, led to them accounting for 40% of Bolivia's $72 million foreign debt (mostly British, American and French) between 1900 and 1930. The railways were also financed with indemnities received after the Pacific and Acre wars. Under the terms of the Treaty of Petrópolis signed in 1903, Bolivia received £2 million, which was used to fund the Bolivian Railway (formed in 1906 as part of the Speyer loan) to build the main railway. Under the terms of the 1904 Treaty of Peace and Friendship (1904), the Chilean government undertook to build the Arica–La Paz railway, completed in 1913, thereby connecting the country's political and economic center with Arica, a natural port for Upper Peru since colonial times. Private companies also invested in railways. By 1925, more than 50% of the lines in operation had been built with British capital.

In this second phase, two stages are identified in the construction of railways. In the first (1900–1915) railroads were built that intensified the connection of several regions of the country with the Pacific. They were oriented to the foreign market and therefore associated with mining. Two additional exits were made to the Pacific: the Guaqui–La Paz railway (98 km) completed in 1905 and the Arica–La Paz railway (233 km) completed in 1913. In addition, Oruro was communicated with Viacha (237 km) in 1913 (Line that only arrived at La Paz in 1917); and two important branches were built that had great impact on the mining regions: Río Mulatos–Potosí River (174 km) in 1912 and Uyuni–Atocha (90 km) in 1913.

In the second stage, starting in 1915, the main objective was to integrate domestic markets. The interests that promoted them and their potential beneficiaries were definitely not directly linked to the mining sector. Therefore, the regional elites had to put pressure on the state for the construction of these railroads. The construction of more railroads began to be completed. First, the La Paz–Yungas railroad (with Beni as final destination), started in 1915 and abandoned after less than 80 km of construction in the 1950s due to lack of financing; then the Sucre–Potosí railroad which began in 1916 and could only be completed in 1935; and finally the Cochabamba–Santa Cruz railway, which began in 1928 and remained unfinished. In this period also began (1915) and concluded (1925) the railroad Atocha–Villazón (206 km) that communicated Uyuni with Argentina. Another railroad completed was from Oruro to Cochabamba (205 km). Although it was initiated in the first stage of this period (1906), its conclusion in 1917 marks a transition between the phase of connection with the outside and that of internal integration. Indeed, this railway was the first major integration effort between two major cities and the most expensive of the railroads built in this period (see Table 1). Rodríguez Ostria synthesizes the arrival of the railroad from Oruro to Cochabamba as follows:

Together with two exceptions of the first period—the Cochabamba–Vinto (18 km) and Cochabamba–Arani (60 km) railroads built by Luz y Fuerza Eléctrica (which included Simón I. Patiño among its main shareholders) between 1910 and 1913—the Oruro–Cochabamba railway had a major impact on the internal transport of passengers and freight. By lowering transportation costs, railroads allowed the importation of foreign products such as sugar and flour, which displaced local production in La Paz, Oruro, Potosí and Cochabamba itself. However, in the case of flour in Cochabamba, local and domestic railways allowed rather the recovery of regional markets in the 1920s that had been adversely affected by railroads in the late nineteenth and early twentieth centuries. On the other hand, the consolidation of the railway network between Bolivia, Argentina and Chile in the mid-1920s led to the development of cattle exports from Tarija to Argentina.

Table 1. Length and cost of construction of the railways in Bolivia, c. 1928 Rail and stretch Length (km) Total cost (£) Cost per km (£) Maximum gradient (%) Antofagasta & Bolivia Railway Ollague–Uyuni 175 462,000 2,750 1.1 Uyuni–Oruro 314 1,221,000 3,880 1.0 Viacha–La Paz 30 400,000 13,333 2.4 Bolivia Railway Co. Uyuni–Atocha 90 621,630 6,907 3.0 Mulatos–Potosí River 174 1,761,702 10,120 3.0 Oruro–Cochabamba 205 3,898,080 19,000 2.6 Viacha–Oruro 202 1,241,093 6,143 1.0 Peruvian Corp. Ltd. Guaqui–La Paz 96 400,000 4,150 1.5 (6% income to La Paz) Ferr. Arica–La Paz 233 1,105,000 4,742 2.0 Ferr. La Paz–Yungas 53 530,000 10,000 6.0 Ferr. Potosí–Sucre 100 1,150,000 11,500 3.0 Ferr. Atocha–Villazón 128 2,000,000 (approx.) 10,100 3.0 Ferr. Machacamarca–Uncía 96 991,667 10,320 2.5 Ferr. Cochabamba–Arani 60 150,000 2,500 1.5 Cochabamba–Vinto 18 60,000 3,800 1.5 Ferr. Corocoro–Tarejra 8 41,600 5,200 1.9 Ferr. Uyuni–Huanchaca 38 228,000 (approx.) 6,000 3.5Source: