The Mid-Wales Railway was conceived as a trunk route through Wales connecting industrial areas in North West England with sea ports in South West Wales. The company was prevented from reaching its goal by competing proposals in Parliament, and it was only able to build a line between Llanidloes and a junction with the Brecon and Merthyr Railway 5 miles (8 km) east of Brecon. The line was 70 miles (110 km) long and opened in 1864. The company found it impossible to raise the share subscription[clarification needed], but the contractor partnership of Davies and Savin agreed to build the line and take shares in payment,
The line passed through terrain requiring steep gradients and sharp curves in a sparsely populated area with little local traffic, and the limited long distance business was costly to operate. Finding continued independence impossible to sustain, the company amalgamated with the Cambrian Railways in 1904.
Use of the line declined from the 1930s onwards, and very limited use of the line resulted in closure on 30 December 1962.