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, but the contractor partnership of Davies and Savin agreed to build the line and take shares in payment,