The West Anglia Main Line is one of the two main lines that operate out of (the other being the Great Eastern Main Line to Ipswich and Norwich). It runs generally north through Cheshunt, Broxbourne, Harlow, Bishop's Stortford and (near Saffron Walden) to Cambridge, with branches between serving Stratford, Hertford and Stansted Airport. The line runs along the boundary between Hertfordshire and Essex for much of its length. In the early years, the line was the main route from London to Cambridge. Following the opening of the Cambridge Line between and , the West Anglia Main Line is now primarily a commuter route for stations between Cambridge and London. It was an important goods route for many years as the southern end of a route from coalfields in Yorkshire, and there are still freight trains which run occasionally to Harlow and Rye House Power Station, along with a Network Rail base at Broxbourne. For details on the routes in the London area, refer to the Lea Valley Lines article. History The first section was built for the Northern and Eastern Railway from Stratford to and opened in 1840. It was extended northwards in stages, reaching Spellbrook, short of Bishops Stortford, in 1842. In 1843 the line reached , and in the following year the Northern and Eastern Railway was leased by the Eastern Counties Railway. It was this railway company opened the section from Bishops Stortford to as part of its extension to and in 1845. By the 1860s the railways in East Anglia were in financial trouble, and most were leased to the Eastern Counties Railway. Although they wished to amalgamate formally, they could not obtain government agreement for this until 1862, when the Great Eastern Railway (GER) was formed by amalgamation. The opening of the Great Northern and Great Eastern Joint Railway in 1882 saw the Great Eastern open up a direct link with coal-producing areas in Nottinghamshire and South Yorkshire joining the line north of Cambridge at Chesterton Junction, generally routed to the large marshalling yards at Temple Mills. Following the grouping in 1923 the line became part of the London & North Eastern Railway. In 1948 following nationalisation the line passed to British Railways Eastern Region. In 1952 the branch from Elsenham to Thaxted (known as the "Gin & Toffee Line") closed to passengers, and goods services were withdrawn a year later. The Saffron Walden line