When the Erie Canal opened in 1825. And the beginnings of the Chesapeake and Ohio Canal, that opened in 1828, Philadelphia business interests became concerned that the port of Philadelphia would suffer a loss of traffic.
The state legislature was pressed to build a canal across Pennsylvania and thus the Main Line of Public Works was commissioned in 1826. It soon became evident that a single canal would not be practical and a series of railroads, incline planes, and canals was proposed. The route consisting of the Philadelphia and Columbia Railroad, canals up the Susquehanna and Juniata rivers, an inclined plane railroad and tunnel across the Allegheny Mountains, and canals down the Conemaugh and Allegheny rivers to Pittsburgh on the Ohio River was completed in 1834. Mainly, because freight and passengers had to change cars several times along the route and canals froze during the winter, it soon became apparent that the system was cumbersome and a better way was needed.
The Commonwealth of Pennsylvania granted a charter to the Pennsylvania Railroad in 1846, to build a private rail line that would connect Harrisburg, Pennsylvania to Pittsburgh, Pennsylvania.
The Directors chose John Edgar Thomson, an engineer from the Georgia Railroad, to survey and construct the line. He chose a route that followed the west bank of the Susquehanna River northward to the confluence with the Juniata River, following its banks until the foothills of the Allegheny Mountains were reached at a point that would become Altoona, Pennsylvania.
In order to traverse the mountains, the line climbed a moderate grade for ten miles until it reached a split of two mountain ravines which were cleverly crossed by building a fill and having the tracks ascend a two hundred and twenty degree curve called "Horseshoe Curve." That limited the grade to less than two percent. The crest of the mountain was penetrated by the 3,612(ft) long Gallitzin Tunnels. And then, descended by a more moderate grade to Johnstown. The western end of the line was simultaneously built from Pittsburgh east along the banks of the Allegheny and Conemaugh rivers to Johnstown. PRR was granted trackage rights over the Philadelphia and Columbus and gained control of the three short lines connecting Lancaster and Harrisburg. Instituting an all rail link between Philadelphia and Pittsburgh by 1854.
In 1857 the PRR purchased the Main Line of Public Works from the State of Pennsylvania and the canals and incline plains were mostly abandoned. The line was double track from its inception and by the end of the century a third and fourth track was added. Over the next fifty years PRR would expand by gaining control of other railroads by stock purchases and acquiring nine hundred and ninety nine year leases.
This line is still an important cross-state corridor, carrying Amtrak's Philadelphia to Harrisburg Main Line and the Norfolk Southern Railway's Pittsburgh Subdivision.