https://en.wikipedia.org/wiki/Panama_Canal_Railway
The Panama Canal Railway is a railway line that runs parallel to the Panama Canal, linking the Atlantic Ocean to the Pacific Ocean in Central America. The route stretches 47.6 miles (76.6 km) across the Isthmus of Panama from Colón (Atlantic) to Balboa (Pacific, near Panama City). It is operated by Panama Canal Railway Company (reporting mark: PCRC), which is jointly owned by Kansas City Southern and Mi-Jack Products.[
The Panama Canal Railway currently provides both freight and passenger service.
The infrastructure of this railroad (formerly named the Panama Railway or Panama Rail Road) was of vital importance for the construction of the Panama Canal over a parallel route half a century later. The principal incentive for the building of the rail line was the vast increase in traffic to California owing to the 1849 California Gold Rush. Construction on the Panama Railroad began in 1850 and the first revenue train ran over the full length on January 28, 1855. Referred to as an inter-oceanic railroad when it opened, it was later also described by some as representing a "transcontinental" railroad, despite only transversing the narrow isthmus connecting the North and South American continents.