In 1894, the Port Talbot Railway and Docks Company obtained Parliamentary approval to redevelop the town's existing harbour and docks, construct a new dock with a deep water lock and piers, and equip them with the best handling facilities available at the time. The intention was to open up the extensive and practically untouched coalfields of the Llynvi, Garw and Dyffryn valleys by providing unrivalled shipment facilities, Port Talbot being much closer than the existing docks at Swansea, Barry or Cardiff.
To transport the coal for export, the second element of the scheme involved the laying of a meandering 17-mile railway linking Port Talbot with Pontyrhyll via Bryn, Maesteg and Lletty Brongu. Loaded trains faced a stiff climb on a ruling gradient of 1:75 as far as the line's summit, thereafter enjoying a 1:40 descent. The tightest curve was of 10 chains radius.
Work on the railway - with an estimated price tag of £200,000 - got underway on 1st March 1895 and was fulfilled by Messrs S Pearson & Son, contractors based in Westminster. Scheduled for completion in March 1897, the single track actually opened for traffic five months late, on 31st August. The PTR&D extended its reach by opening two other connecting lines during 1898; its new docks were also inaugurated that year.
The railway's principal engineering feat was Cwmcerwyn (or Bryn) Tunnel, extending for 1,012 yards. It passes through mixed strata, resulting in a varied approach to construction and several changes in profile. In some places where rock was encountered, sidewalls were dispensed with, the arch being supported on shelves. But generally the lining comprises four or five brick rings in lime mortar, with brickwork or stone sidewalls. At a few locations, short lengths of concrete invert were also added.
Ground movement was recorded from the outset, prompting an assortment of remedial works. The worst affected section of 180 feet was found 362 yards from the western end. Here, various measures were taken to address bulging of the sidewalls, with a length of 35 feet strengthened in 1898 by constructing five sections of concrete invert, whilst in August 1902 a further 70-foot length was similarly dealt with. 1907 brought the decision to rebuild this entire part with cast iron segments, a project that was undertaken by Messrs Perry & Co without affecting traffic on the line.
The tunnel marks summit level of the PTR. It is level for almost half its length from the eastern entrance, but the gradient thereafter falls at 1 in 70. The transition point was located at No.29 tablet where the remains of a gong can still be found in the adjacent refuge, presumably having been installed to provide footplate crews with an audible warning of the change. At the west portal the gradient steepens abruptly to 1 in 40. Curves feature at both ends, but the eastern one is bearly perceptible, extending only for a few yards.
The condition of the tunnel's lining is generally fair although some distortion is apparent in places. Around 330 yards from the west end, four strengthening ribs have been inserted, supported on timber footings. Water eaches through the brickwork at many locations, forming substantial calcite deposits on the walls. Failure of the drainage system has resulted in thick mud accumulating, particularly through the level eastern half.Refuges are provided at regular intervals on both sides and two mileposts still stand against the south sidewall. Close to the west portal in the curved section are the remains of a device that was probably installed to lubricate the rails and reduce wheel squeal.
The portals are both modest brick affairs, with commemorative keystones inscribed "PTR 1897". They are secured by brick blockwalls, above which are high-level grilles for ventilation. These were installed by British Railways Board (Residuary) in July 2013. The saturated eastern approach cutting is the more secluded of the two, with steep sides; both are about 90 yards in length. The tunnel is identified by its structure number PTP/5m 8ch.The Port Talbot Railway effectively became a long branch line on New Year's Eve 1951 with closure of the eastern section from Lletty Brongu to Pontyrhyll. Freight traffic continued to venture as far as Maesteg Neath Road - through the tunnel - until closure claimed the PTR on 31st August 1964.