In 1861 the Llynvi Valley Railway was opened in Glamorganshire, Wales, to convey mineral products to the Bristol Channel at Porthcawl. It adopted an earlier tramroad, the Duffryn Llynvi and Porthcawl Railway. The Llynvi and Ogmore Railway was opened in 1865, and the two companies amalgamated to form the Llynvi and Ogmore Railway in 1866. At first Porthcawl harbour was an important destination for onward transport, but this soon declined.