Railroad and single-lane road bridge at Gamboa, crossing the Chagres River alongside the Panama Canal
Railroad and single-lane road bridge at Gamboa, crossing the Chagres River alongside the Panama Canal

Panama Canal Railway

History of PanamaTransportation in PanamaRailwaysEngineering achievementsCalifornia Gold Rush
4 min read

On a rainy midnight in January 1855, lit by sputtering whale oil lamps, chief engineer George M. Totten drove the final spike into a pine crosstie with a nine-pound maul. The next morning, a locomotive with freight and passenger cars crossed from the Atlantic to the Pacific for the first time in history. The Panama Canal Railway had taken five brutal years to build, cost $8 million -- eight times the original estimate -- and claimed somewhere between 5,000 and 10,000 lives. Yet this 47-mile ribbon of iron through jungle and swamp would reshape global commerce, outlast the empires that built it, and prove indispensable to the canal that eventually overshadowed it.

Gold Fever and Desperate Crossings

Before the railway, crossing Panama meant days of misery. Travelers paddled native dugout canoes up the treacherous Chagres River, then rode mules for the final 20 miles over crumbling Spanish trails that three meters of annual rainfall had turned to slurry. The transit took four to eight days and killed people regularly. When gold was discovered in California in 1848, this hellish route suddenly became the fastest link between the American East Coast and the goldfields. William H. Aspinwall, who held the Pacific mail steamship contract, saw opportunity in the desperation. He and his partners incorporated the Panama Railroad Company in New York, raised a million dollars in stock, and sent survey teams into the jungle. Their timing was impeccable: the California Gold Rush was turning the isthmus into a highway, and every traveler was a potential paying customer.

Building Through the Swamp

Construction began in May 1850 on Manzanillo Island, a mangrove-covered spit so marshy that buildings had to stand on stilts and abandoned Gold Rush ships were towed in for temporary housing. The first eight miles crossed gelatinous swamps infested with alligators, requiring over 200 feet of gravel backfill in places just to secure a roadbed. Workers wielded machetes, axes, picks, and shovels in stifling heat, with mosquitoes and sandflies so thick they blackened skin. Cholera, yellow fever, and malaria killed thousands. In 1852, the worst year, cholera swept the construction line after arriving on a boat from New Orleans. Nearly all of chief engineer Totten's staff died -- 51 engineers, surveyors, and draftsmen. Captain Ulysses S. Grant, leading his regiment across the isthmus, lost over 150 soldiers and family members to cholera. He would later say the horrors of Panama haunted him more than any battle.

A Fortune Saved by a Hurricane

By November 1851, the project was nearly bankrupt. The original million dollars was spent, and only eight miles of track reached Gatun. Then a Caribbean hurricane forced two large steamships carrying about a thousand California-bound passengers into shelter at Bahia Limon. Desperate travelers paid fifty cents per mile to ride flatcars and gondolas to the end of the track, generating an infusion of cash that saved the company. The directors immediately ordered passenger cars, and the railway began regular service with 40 miles still to be laid. By the time the full line opened in 1855, more than a third of its $8 million cost had already been recouped from fares and freight. At $25 for a one-way, first-class ticket across 47 miles, it charged one of the highest per-mile rates in existence. The railroad became one of the most profitable in the world, carrying the heaviest freight volume per unit length of any railway until the canal opened.

The Canal's Indispensable Backbone

When the United States began building the Panama Canal in 1904, the railway became the project's circulatory system. Chief engineer John Stevens replaced the worn French-era equipment with 115 powerful locomotives, 2,300 dirt cars, and 102 railroad-mounted steam shovels -- some of the largest in the world. The railway hauled hundreds of millions of cubic yards of excavated rock and earth from the Culebra Cut to dumping grounds, using an ingenious system: trains of 20 flatcars, loaded by steam shovels running on parallel tracks, were unloaded in under ten minutes by a steel plow winched along the entire train length. At the peak of construction, 160 loaded dirt trains departed the Culebra Cut daily. The railroad was rebuilt in its final configuration by 1912, rerouted around the newly created Gatun Lake, at a cost of $9 million -- a million more than the original line had cost to build from nothing.

Decline and Rebirth

After World War II, the railway fell into neglect. When the United States returned control to Panama in 1979, conditions worsened steadily. By the 1990s, trains were limited to 10 miles per hour and the railroad was hemorrhaging millions monthly. In 1998, Panama offered a 50-year concession to rebuild it, won by a joint venture between Kansas City Southern and Mi-Jack Products. The three-year reconstruction converted the line from its original five-foot gauge to standard gauge and modernized it for intermodal container traffic. Reopened in 2001, the railway now hauls about 1,500 containers per day between double-stack terminals at each end. Its locomotive numbering begins at 1855, honoring the year the original line was completed. In 2025, Canadian Pacific Kansas City and Mi-Jack sold the railway to APM Terminals, owned by Maersk. After 170 years, the iron thread across the isthmus still carries freight from ocean to ocean.

From the Air

The Panama Canal Railway runs 47.6 miles from Colon (Atlantic) to Balboa (Pacific) at coordinates 8.977N, 79.568W. The line parallels the Panama Canal and crosses Gatun Lake, making it visible from altitude as it threads between the canal channel and the surrounding jungle. Nearest airports include Tocumen International (MPTO) and Marcos A. Gelabert International (MPMG, also known as Albrook). Recommended viewing altitude: 3,000-5,000 feet for the rail line tracing along the canal corridor.