The history of the railway dates back to 1872 with the grant of a concession by the government of Bolivia to Melbourne Clarke & Co, the territory around Antofagasta being part of Bolivia at this date.
War broke out in 1879 between Chile on one side, and Peru and Bolivia on the other.