The Madeira-Mamoré Railroad is an abandoned railroad built in the Brazilian state of Rondônia between 1907 and 1912. The railroad links the cities of Porto Velho and Guajará-Mirim. It became known as the "Devil's Railroad" because thousands of construction workers died from tropical diseases and violence. There is a legend that a cadaver is buried underneath each sleeper.
In 1846 the engineer José Augustin Palácios and the Swiss German engineer Rudolf Oscar Kesselring convinced Bolivian authorities that the best way to secure access to the Atlantic ocean was through the Amazon. At the time, Bolivia had access to the Pacific ocean (subsequently lost to Chile in the war of the pacific in 1884), but the lucrative trade routes with the United States and Europe were located in the Atlantic. In 1851, the government of the United States became interested in access to Bolivian products (notably rubber), and contracted Lieutenant Lardner Gibbon to study the viability of a rail link between the navigable Amazon river and Bolivian production centres. Gibbon's study concluded that a railroad along the Madeira River rapids would allow efficient transport of goods from the Bolivian capital of La Paz to US markets.
During the 1870s, the American George Earl Church made two attempts to overcome the Madeira River rapids in order to gain access to Bolivian rubber markets. Both efforts were defeated by the difficult terrain and by appalling loss of life to malaria, accidents, and violence. A successful bid to build the railroad began with the Treaty of Petrópolis (1903) whereby Bolivia gave Brazil the territory of Acre (191,000 km²), in exchange for Brazilian territory, a monetary payment, and a pledge that Brazil would build a rail link to bypass the rapids on the Madeira river. Construction began in 1907, and on April 30, 1912, the final leg of the Madeira-Mamoré Railway was inaugurated.