The Buffalo Line is a railroad line owned by the Norfolk Southern Railway in the U.S. states of New York and Pennsylvania. The line runs from Buffalo, New York southeast to Rockville, Pennsylvania near Harrisburg, Pennsylvania along a former Pennsylvania Railroad line. Its north end is at Seneca Yard in Buffalo, with no direct access to the Lake Erie district, and its south end is at the Pittsburgh Line at Rockville. The line is operated by the Norfolk Southern Railway between Rockville and Driftwood, Pennsylvania, the Western New York and Pennsylvania Railroad between Driftwood and Machias, New York, and the Buffalo and Pittsburgh Railroad between Machias and Buffalo.
The Sunbury and Erie Railroad opened from Williamsport, Pennsylvania south to Milton in 1854,Northumberland in 1855, and Sunbury in 1856. Extensions west from Williamsport opened to Whetham in 1859,Keating (as the Philadelphia and Erie Railroad) in 1862, reorganize in 1895 to Western New York and Pennsylvania Railway, and finally reaching Emporium (also as the P&E) in 1863. A cutoff bypassing downtown Williamsport to the south, from Allen's west to Nisbet, opened in the early 1870s, and is now part of the Buffalo Line.