Masham branch

The Masham branch was a 7+3/4 mi long North Eastern Railway built single track branch railway line that ran between a junction on the Harrogate to Northallerton line at Melmerby to Masham, North Yorkshire, via one intermediate station, Tanfield.

Opening
After a number of abortive attempts to link the market town of Masham, Wensleydale, the branch line was authorised by an Act of Parliament in 1871 and construction started in 1873. The line was delayed in opening for a full year as the railway company could not agree terms for some of the land. Other problems were also encountered; when building an embankment across a peat bog just outside of the village of Wath, the railway builders found that their initial estimate of 16,000 yard of earth would need to be increased threefold to traverse the bog beneath. The branch line opened on 9 June 1875 and services started the following day.

Traffic
The line was poorly used from the start. Passing to the London and North Eastern Railway in the 1923 grouping, the line continued to suffer from light traffic apart from a period during the Second World War when the local area was used for munition storage in the area around Tanfield station. In the run-up to D-Day, trainloads of 50 wagons were leaving the site to supply the operation with munitions.

Both Tanfield and Masham stations had been provided with goods facilities in the station area. Tanfield had a passing loop in the station, but was only constructed with one platform. Masham had a goods yard directly next to the station platforms, but was also provided with a transhipment goods yard north of the station and across the Masham to Melmerby road (now the A6108 road) for the narrow gauge railway supplying the reservoir building further west.

A passenger train derailed between Tanfield and Masham on the 5 April 1926. 30 people were aboard the train and despite the train leaving the rails, there were no injuries. The cause was later attributed to newly laid rail on a bed of ash (instead of being properly ballasted) that had buckled in unseasonably hot weather.

Leighton and Roundhill Reservoir railway
A 6 mi 2 ft railway was built between Masham and the Leighton Wood area (just north of Masham Moor). This line was used to transport equipment and materials to the building of a reservoir at Roundhill for the Harrogate Corporation and the line was also used by the Leeds Corporation to build their reservoir at Leighton immediately downstream. The line opened in 1905 and was closed in 1930, some time after completion of both reservoirs.

Closure
By the time of the line's closure to passengers on 1 January 1931, it had four passenger services a day. The line closed completely on 11 November 1963.