The portions of the line from Suffern to Harriman and from Otisville to Port Jervis were built as the mainline of the New York and Erie Rail Road, opening to Port Jervis in 1848. The route south of Suffern is slightly younger (connected for through service in 1853); the original mainline ran east from Suffern to Piermont. The portion from Harriman to Otisville was built in 1906–1909 as a low-level freight bypass named the Graham Line. This portion of the line bypasses the original Erie mainline through Monroe, Chester, Goshen and Middletown.