Cambridge was an obvious target for many railway companies in the 1840s railway boom, and no less than 5 different schemes were put forward. At that time, Cambridge was much smaller; the current railway station site was then around a mile from the nearest built-up roads. Eventually the 1844 Act was authorised for a route from Newport just South of Saffron Walden which had been reached in 1843 by the Northern and Eastern Railway (N&ER), and operated by the Eastern Counties Railway (ECR). The N&ER was taken over by the ECR and it eas thus the ECR which completed the line to Cambridge in 1845. The ECR could then push on northwards, as it duly did, with the route to Ely and Brandon following on, reaching Brandon and an end-on connection to the new Norfolk Railway in July 1845.
While this was happening, another group was busy proposing and building what is now the St Ives branch, or "Loop Line", created with many local hopes of better times for farmers, for whom getting produce to the weekly market on the poor roads was a major issue. This line, authorised in 1845 and opened in 1846/7, was followed shortly after by the arrival at nearby Shepreth of the Great Northern Railway (GNR), who had built a route from Hitchin on their main line. Wrangling with the ECR (and later owners the Great Eastern Railway, GER) resulted in GNR passengers from Cambridge having to travel by horse to get to the GNR station at Shepreth. This was finally resolved in an 1864 agreement with the GER who permitted a junction and running powers into Cambridge. In 1866, the Midland Railway reached Huntingdon from Kettering; they had already negotiated running powers with the GER for the St Ives to Cambridge line, and, using the 4 mile St Ives to Huntingdon link of the ill-fated Ely and Huntingdon Railway of 1849, commenced through trains to Cambridge in 1882.
The Newmarket and Chesterford Railway Company was proposed by local landowners and the Jockey Club to link Newmarket to the capital, and so initially avoided Cambridge, though a junction was planned. Construction started in 1846 at Dullingham and opened in 1848, but it was poorly run and soon ran to financial ruin. In 1850 Cecil Fane, the Bankruptcy Commissioner, realized the company could be revived and took control. He suggested that one track of the double track line from Six Mile Bottom to Chesterford should be used to create the intended link to Cambridge. Afterwards it was realised that the Chesterford link would never be profitable, so it was closed in 1851. The Cambridge link was, however, successful and with the ECR and later GER operating it, the single track to Cambridge was eventually doubled again.
The Ely to St Ives route started as a link from Ely to Sutton by the Ely, Haddenham and Sutton Railway Company, authorised in February 1864 to be run by the GER. A proposal to link Haddenham to Longstanton in the south received authorisation in 1869, but it failed; another proposal to extend to St Ives was presented to Parliament in 1876 and opened in 1878, adding stations at Bluntisham and Earith Bridge. For much of its life its main traffic was fruit; although passengers, coal and other items were transported, the lifeblood were agricultural produce that used the railway to get to market, not least to the jam factory of Chivers at Histon. That factory alone was responsible for over 20,000 tons of fruit every month for much of the season, almost all of which was carried by train. It was closed in stages from 1931, when regular passenger services stopped, from 1958, when the centre section from Sutton to Bluntisham closed, and the rest of the line in 1964.