The Main Line is a rail line owned and operated by the Long Island Rail Road in the U.S. state of New York. It begins as a two-track line at Long Island City station in Long Island City, Queens, and runs along the middle of Long Island about 95 miles (153 km) to Greenport station in Greenport, Suffolk County. At Harold Interlocking approximately one mile east of Long Island City, the tracks from the East River Tunnels and 63rd Street Tunnel into Manhattan intersect with the Main Line, which most trains use rather than using the Long Island City station.

Continuing east, five branches split from the Main Line. In order from west to east, they are: Port Washington Branch (at Harold Interlocking in Long Island City, Queens) Hempstead Branch (at Queens Interlocking along the Queens/Nassau County border) Oyster Bay Branch (at Nassau Interlocking, east of Mineola station) Port Jefferson Branch (at Divide Interlocking, east of Hicksville station) Central Branch (at Beth Interlocking, east of Bethpage station)—single non-electrified track with no stations, connecting the Main Line to the Montauk Branch

West of Ronkonkoma station, the Main Line is largely double tracked and electrified with 750V DC third rail, with trains governed by Automatic Block and Interlocking Signals and by Automatic Train Control. The line contains a third track between Divide and Park Interlockings and a fourth track between Park and Harold Interlockings. East of Ronkonkoma to Greenport, the line is not electrified and trains operate in non-signaled dark territory, with all train movements being governed by timetable and train order authority. Passenger service east of Hicksville station is covered by Ronkonkoma Branch timetables, as it is the final connecting point to other services.

Route description and current service The Main Line has one track from just east of Long Island City, where it splits into two tracks just before Borden Avenue, which continue through Hunterspoint Avenue station to Harold Interlocking (Harold, northwest of the Woodside station), where the four track Northeast Corridor from Penn Station in Manhattan joins the Main Line after passing through the East River Tunnels.The tunnels and the track to Penn Station are not owned by LIRR, but by Amtrak. East of Harold,from to the four-track Main Line runs adjacent to the two-track Port Washington Branch until, southeast of the Woodside station, the Port Washington Branch turns northeastward. The Main Line continues southeast with four tracks to Jay Interlocking where it meets the Atlantic Branch and Montauk Branch at the west end of Jamaica station. Eight platform tracks and two bypass tracks pass Jamaica station, along with a few yard tracks and two former freight tracks on the south side that can be used by trains bypassing Jamaica. At Hall Interlocking just east of the station there are eight through tracks: two usually westward tracks for Main Line and Montauk trains, two Atlantic Branch tracks that are about to duck under and turn southeast, two usually eastward Main Line/Montauk tracks, and the two former freight tracks on the south side of Hall tower.

Just east of there, Montauk Branch trains get their own two tracks in the center of the four Main Line tracks until the Montauk tracks fly over the other tracks and head southeast. At Queens and Park Interlockings, just inside Nassau County between the Queens Village and Floral Park stations, the four-track Main Line splits into the three-track Main Line and the two-track Hempstead Branch (with one track shared by both lines); the four tracks continue parallel through Floral Park station, after which the Hempstead Branch curves away southward and the three-track Main Line continues east to Mineola. East of Mineola, the Oyster Bay Branch splits from the northernmost Main Line track and curves to the north. The Main Line then continues east from Mineola to Hicksville, where the two track Port Jefferson Branch begins and curves to the north. At Hicksville, the Main Line reverts to two tracks. From Farm Interlocking (just east of Farmingdale station), the Main Line continues to Ronkonkoma, except for some freight sidings along the route.

The Main Line west of Jamaica to Harold Interlocking is the only line that connects to the East River Tunnels and the 63rd Street Tunnel, so it is used by all trains operating to New York Penn Station and Grand Central Madison, both in Manhattan. The portion between Harold and the Long Island City station is used by trains originating or terminating at Hunterspoint Avenue or Long Island City.

East of Jamaica station, the Main Line is used by all trains on the Hempstead Branch (diverging east of Queens Village), the Oyster Bay Branch (diverging east of Mineola), the Port Jefferson Branch (diverging east of Hicksville), and the Ronkonkoma Branch (terminating at Ronkonkoma, the eastern limits of the line's electrification). Some Montauk Branch trains use the Main Line on their way to Babylon via the Central Branch, diverging east of Bethpage.

Only a few diesel shuttle trains, informally known as scoots, operate between Ronkonkoma and Greenport.

History

19th century The Main Line opened beyond Jamaica to Hicksville on March 1, 1837; shortly afterwards, the Panic of 1837 severely curtailed construction. Construction on the line to Greenport resumed in 1840. It was extended to Farmingdale on October 15, 1841, Deer Park on March 14, 1842, Brentwood on June 24, 1842, Central Islip on July 14, 1842 and Yaphank on June 26, 1844. An opening excursion to Greenport was operated on July 27, 1844, and revenue service began over the full line on July 29.

The city of Brooklyn banned the LIRR from using steam propulsion within city limits effective July 1, 1851. The railroad refused to comply until early October, when they stopped freight and passenger trains at Jamaica, directing passengers to take Fulton Street stages to Bedford and transfer there to "Jamaica Line" stages. Laws passed on April 19, 1859 allowed for the appointment of commissioners, empowered to contract with the LIRR to close the Cobble Hill Tunnel, cease using steam within city limits, and instead run horse cars for freight and passengers to the city line or East New York, connecting with steam trains to and beyond Jamaica there. By the fall of 1861, both use of steam as propulsion and of the tunnel had ceased.

In order to maintain access to New York, the LIRR chartered the New York and Jamaica Railroad (NY&J) on September 3, 1859, , March 2005 Edition and a supplement to the LIRR's charter passed March 12, 1860 authorized it to buy the NY&J and build a new main line from Jamaica to Hunters Point. The LIRR carried through with the NY&J purchase on April 25, along with the purchase of a short piece of the Brooklyn and Jamaica at Jamaica. , May 2004 Edition The new line to Hunters Point was officially opened on May 9, 1861, with regular service starting May 10, using a portion of the tracks of the Flushing Railroad between Winfield and Hunters Point.

Floral Park station was built between October and November 1878 as "Stewart Junction," for the junction between the LIRR Main Line and the Central Railroad of Long Island built by Alexander Turney Stewart. Five years earlier the CRRLI had bridged the LIRR, and the station served as a connection between both lines. Connecting tracks were available at the southwest corner of the bridge at the station, and on the northwest corner of the bridge west of the station. It was renamed "Hinsdale" in 1879 with the closing of the CRRLI depot of the same name along the Creedmoor Branch, then renamed "East Hinsdale" in 1887. That same year, the station gained a control tower known as "Tower #47." Apparently due to the presence of the florist John Lewis Childs, the station was renamed "Floral Park" by 1890.

On January 1, 1881, Austin Corbin took over the Long Island Rail Road and sought out to install new rails on the Main Line from Winfield Junction to Jamaica. In February 1881, all service on the Main Line was halted, and this station was temporarily abandoned at this time. Starting in April, the old rails were torn up and used on the South Side Railroad of Long Island. The temporary abandonment inconvenienced visitors to the Cemetery, and during this period, the managers of the cemetery made arrangements to have visitors transported free of charge to the Richmond Hill station on the Montauk Division.

The tracks were relaid during September and October 1882, and the line was rebuilt as a double-track line with iron rails. The line was reopened on October 25, 1882 for freight only to allow the Montauk Division to be exclusively used for passenger service. Service resumed on May 30, 1883 with one daily train in each direction after the managers of the cemetery made a request to the directors of the Long Island Rail Road. In 1886, the station was moved to provide space for a lawn and flowerbed.

After Hopedale station closed in 1884, this was the only station on the Main Line between Winfield and Jamaica, and as of 1897, the line was mostly used for freight, with the exception of some passenger service during commuting hours.

The line was double-tracked to Hicksville in 1890.

Early 20th century The line was electrified to Queens Village and Belmont Park on October 2, 1905. On May 26, 1908, the line was electrified to Floral Park; Hempstead Branch stations southeast of Floral Park were electrified on the same date. The line was triple-tracked between Bellerose and Floral Park in 1908.

Around the same time, the construction of Pennsylvania Station and Sunnyside Yard necessitated the construction of a new grade-separated route within Woodside to increase train capacity, which was limited by the previous at-grade routing. Land acquisition for this reroute, dubbed the "Woodside/Winfield Cut-Off", starting in 1908.

In order to provide fast service for the opening of the Pennsylvania Railroad's East River Tunnels in 1910, the Long Island Rail Road completely rebuilt the Main Line between Winfield and Jamaica from one track to four tracks, with two additional tracks between the Glendale Cut-Off and Winfield. 40 grade crossings were eliminated as part of the project. In addition, the line was electrified using a third rail. This was expected to reduce the running time between Jamaica and Sunnyside Yard from 18 minutes to 12 minutes.

Maple Grove Cut-off To speed up service through Kew Gardens, the LIRR undertook the construction of the Maple Grove Cut-Off for $500,000. The Cut-Off shortened the Main Line by , and sped up service with the construction of a new straightened four-track route that ran at a lower grade. The Cut-Off branched from the original line about north of Ascan Avenue in Forest Hills, and continued to 84th Drive in Kew Gardens, or about east of Lefferts Avenue. The original line ran straight from Winfield to within a few feet of Queens Boulevard at Lefferts Avenue (now Boulevard) and then curved sharply southeast around the southern edge of Maple Grove Cemetery, slowing service.