The Llynfi and Ogmore Railway (L&OVR) was formed on 28 June 1866 (itself the amalgamation of earlier lines); a standard gauge line as opposed to the main line. On 1 July 1873 the GWR took over the L&OVR.
The line from Bridgend originally operated beyond Maesteg through Caerau and the Cymmer Tunnel, known locally as the 'Gwdihw', to passenger stations in Cymmer, known as Cymmer General and further to Abergwynfi. The lines also connected colleries in Abergwynfi and Glyncorrwg. Junctions at both Tondu and Cymmer connected with east-west routes across the Llynfi and Afan valleys.
The Maesteg branch was closed to passenger trains in 1970 (though it remained in use for coal traffic until 1988), and the link with the Afan Valley was lost due to the closure of the Cymmer Tunnel.
The railway north of Maesteg continued to exist until 2004, however it was removed as part of the Maesteg Washery reclamation scheme. The track to the north of Llynfi North Junction, including the former Nantyffyllon and Caerau stations, have been part of a major housing developments. Reconnection with Cymmer (Afan Valley) is impossible – the tunnel portal is still visible at the Caerau end but it is completely buried at the Cymmer end.
Today the line is operated by Arriva Trains Wales on services from Cheltenham Spa to Maesteg via Cardiff Central and Bridgend, and repeated from Maesteg to Cheltenham Spa.