The Treaty of Petrópolis, signed on November 11, 1903 in the Brazilian Imperial city of Petrópolis, near Rio de Janeiro, ended tensions between Bolivia and Brazil over the then-Bolivian territory of Acre (today the Acre state), a desirable territory during the contemporary rubber boom.
The treaty, drafted by Brazilian foreign affairs minister José Paranhos, Baron of Rio Branco, gave Brazil the territory of Acre (191,000 km2), in exchange for over 3,000 km2 of Brazilian territory between the Abunâ and Madeira rivers, a monetary payment of two million British pounds, paid in two installments, and a pledge of a rail-link between the Bolivian city of Riberalta and the Brazilian city of Porto Velho, which would bypass the rapids on the Madeira.
The rail line was called the Madeira-Mamoré Railway. It was supposed to go as far as Riberalta, on the Rio Beni, above that river's rapids, but had to stop short at Guajará-Mirim. This was actually the third such attempt. In the 1870s, during the rubber boom, the American George Church was defeated twice by the heat, the difficulty of the terrain and appalling loss of life from fever. The contract for the Madeira-Mamoré railway required by the treaty was won by another American, Percival Farquhar. Construction began in August 1907 and was completed on July 15, 1912. The project cost US$33 million. At least 3,600 men died building the 367 km of track Guajaramirin-Station (popular estimates say that each one hundred sleepers cost one human life). The Madeira-Mamoré railway had about a year of full operation before the combination of the collapse of rubber prices, the opening of a railway from Bolivia to the Pacific via Chile and of the Panama Canal rendered it uneconomical. It was kept in operation until 1972.
The BR-364 road eventually subsumed the route as railway bridges were taken over, leaving what remained of the track to enthusiasts to salvage what they could.