In 1821, a parliamentary bill was passed to allow the building of the Stockton and Darlington Railway (S&DR). The 25-mile (40km) railway was intended to connect various collieries situated near Bishop Auckland to the River Tees at Stockton, passing through Darlington on the way.