The enormous Cape Fold Belt effectively separated Cape Town on the coast from the hinterland of Southern Africa, and had obstructed previous attempts to expand the Cape Colony's railway infrastructure inland. In 1872 the Cape Government, under Prime Minister John Molteno, ordered that a railway line must be constructed across this barrier in the vicinity of the Hex River Mountains. The Cape Government Railways (CGR) was formed and railway engineer William George Brounger was appointed to oversee the task.
The Hex River Mountain was a major obstacle to be overcome during the construction of the railway between Cape Town and the diamond fields at Kimberley in the Northern Cape. In 1874 surveyor Wells Hood, under the instruction of Brounger, found a potential route up the 2,353 feet (717 metres) climb from De Doorns in the Hex River valley to the top of the Karoo plateau east of the Valley, that would require gradients of no more than 1 in 40 uncompensated, very steep by railway standards, and tight curves with a minimum radius of 100 metres (328 feet). He also proposed that a short tunnel would be required.
By 1876, the Molteno Government had selected Thomas Brounger's proposed route through the Hex River valley, with the line to follow the route from Worcester through De Doorns, then along Hood's proposed pass across the mountain via Osplaas to the 3,147 feet (959 metres) summit at Matroosberg, and then via Kleinstraat to Touws River.
The original line between Cape Town and Wellington was laid to 4 ft 8 1⁄2 in (1,435 mm) standard gauge, but this gauge could not be accommodated economically on the tight curves required by the proposed Hex River rail pass. This led to a decision by the CGR to use a narrower gauge of 3 ft 6 in (1,067 mm) across the pass. After initially making use of dual gauge, it was eventually decided to convert all existing trackage of the CGR to this narrower gauge that was eventually to become known throughout Africa as Cape gauge. Credit for the fact that most of the present day railway lines in Africa are Cape gauge can therefore be directly attributed to the Hex River rail pass.
The original 180 metres (591 feet) tunnel, Southern Africa's first railway tunnel, is situated at 34 kilometres (21.13 miles) from De Doorns on the original line to Matroosberg. The tunnel is straight and the portals are of dressed stone masonry, but the inside is unlined. On the route ascending the mountain, Osplaas provided the only level stretch that was long enough for a conventional passing loop.
This first tunnel served the railways for 53 years, until the track was re-laid in 1929 to diminish a curve to accommodate larger locomotives. In the process a new concrete lined curved tunnel was sunk alongside the original. Since another crossing place had also become necessary, a siding named Tunnel was fashioned just east of the tunnel by laying two level dead-end spur tracks that branched directly off on opposite sides of the main line. This allowed trains to wait in one or the other of these sidings to allow an opposing train to pass. This latter tunnel remained in use for sixty years, until the line across the pass was closed to rail traffic in 1989.
Despite its quick and relatively cheap construction, the Hex River rail pass served the South African Railways (SAR) for more than a century. It was the starting point of the country's first railway line to the Witwatersrand and opened the way for Cecil Rhodes' colonisation thrust into central Southern Africa.
The railway line between Cape Town and Beaufort West has a ruling grade of 1 in 66 and a minimum curvature of 200 metres (656 feet), except for the pass where the steep gradient and sharp curves restricted train lengths and required additional locomotive power to bank trains on the ascent. In 1943 the gradients between De Doorns and Matroosberg stations were eased to 1 in 40 compensated, while the curves were eased to a minimum radius of 200 metres (656 feet), but despite this the Hex River rail pass still formed a bottleneck that would require more drastic measures to be eliminated.
This eventually led to the decision to construct a tunnel system to eliminate the Hex River rail pass altogether. In 1945 Mr W.H. Evans, later to become Chief Civil Engineer of the SAR, proposed a new route for the section between De Doorns and Matroosberg that would result in a gradient of 1 in 66 compensated and a minimum curve radius of 800 metres (2,625 feet). The scheme would require four tunnels, two with a length of 0.8 kilometres (0.5 miles) each and two more with lengths of 2.4 kilometres (1.5 miles) and 13.5 kilometres (8.4 miles) respectively. The benefits to the SAR would be significant. Operating costs would be decreased as a result of the elimination of sharp curves and steep gradients. The length of the section would be reduced by 8 kilometres (5 miles) and it would also eliminate altogether 5,280 degrees of curvature and 110 metres (361 feet) of false rise in level. Train running times could be reduced by 23 minutes in the ascending direction and 36 minutes in the descending direction.
The scheme was approved in 1946 and it was decided that full-face working would be employed in the long tunnel. With this method and working two faces simultaneously, it was expected that 3.5 kilometres (2.2 miles) complete with lining could be achieved annually, with the whole tunnel completed in four years.
Tunnelling on the subsidiary tunnels and external earthworks commenced immediately, but start of work on the long tunnel was delayed due to special equipment that had to be designed and ordered in 1946. While awaiting the special equipment, the western (Cape Town side) and eastern (Johannesburg side) portals were established by heading and benching, and short 20 metres (66 feet) sections of tunnel were driven at both ends by 1948. The original eastern portal (coordinates 33.405814°S 19.9008°E / -33.405814; 19.9008) was dug immediately adjacent to the N1 national road some 15 kilometres (9 miles) west of Touws River and took the form of a gradient into a trench cutting, down to sufficient depth to commence tunnelling.
In April 1950, however, work on the whole Hexton scheme was deferred for reasons of economy. Instead, the existing line through the pass was electrified by 1954 and operated with the Class 4E electric locomotives that had been ordered for use through the tunnels. At the time the project was halted, altogether 1,170 metres (3,839 feet) of tunnel had been excavated and 540 metres (1,772 feet) of concrete lining had been placed in the shorter tunnels.
The tunnel scheme was briefly resuscitated in 1965 but was deferred once again in 1966. Work was eventually resumed in 1974 and included the remodelling of the lower section of the deviation between De Doorns and Osplaas stations as well as the construction of tunnel no. 1, the twin tunnels. This was completed in 1976, at which point financial constraints resulted in yet another postponement. Authority to proceed was only given once again in late 1979.
In most respects the scheme as eventually completed was the same as that envisaged in 1945. Before proceeding in 1979, however, a sophisticated evaluation of the capacity of the whole Hexton scheme had been carried out using train diagrams and computer-devised train running times. The conclusion was that, with only two passing loops between De Doorns and Kleinstraat compared to the three at Osplaas, Tunnel and Matroosberg on the existing line, the capacity would be 31 trains, but with an additional passing loop it would increase to 42 trains. It was therefore decided to place a third passing loop, called Hexton, inside the long tunnel in addition to the two loops between tunnels no. 1 and 2 at Almeria and between tunnels no. 3 and 4 at Salbar respectively.
When tenders were invited, two routes had been selected for tunnel no. 4, the longest tunnel. One would be straight and more or less on the original location, but with the eastern portal relocated further away from the N1 national road. The other would be curved to pass through shale material, that would make the use of a tunnel boring machine an economical proposition. Tenderers were invited to quote for circular or horseshoe profiles and concrete or shotcrete linings for each of the two profiles and for each of the proposed routes. After the engineering, geological and economic factors had been analysed, the straight route with a horseshoe profile and concrete lining was finally selected.
The tunnel was constructed by Compagnie Interafricaine De Travaux (Comiat), a division of Spie-Batignolles in Paris, France.
The contract for tunnel no. 4 was awarded on 13 August 1980 at a tender price of R26,770,082 and with the completion date four years later on 12 August 1984. The contractual completion date was later extended to 25 February 1986. Construction commenced in September 1980, with tunnel excavation commencing in January 1981. As a result of unforeseen adverse sub-surface conditions that were encountered during the execution of the contract, however, the tunnel was only completed in November 1988.
Tunnels no. 2 and 3 are similar in construction to the long tunnel, but were completed under a separate contract at a cost of R9 million. Both of them had been partly excavated when work was suspended in 1949, the 1.1 kilometres (0.68 miles) tunnel no. 2 to a distance of 583 metres (1,913 feet) of which most was concrete lined, and the 1.2 kilometres (0.75 miles) tunnel no. 3 to a distance of 467 metres (1,532 feet), but only lined in areas of poor ground. The contract called for both to be widened to new design standards to allow for overhead electrification and broader loading gauge clearances.
The western portal (coordinates 33.415182°S 19.765646°E / -33.415182; 19.765646) of tunnel no. 4, as established in 1948, enters directly into the mountain face, which is nearly vertical at that point. The eastern portal (coordinates 33.40843°S 19.908717°E / -33.40843; 19.908717) was relocated a short distance to the southeast of the original 1948 portal and is in a 600 metres (1,969 feet) long and 16 metres (52 feet) deep cutting. The tunnel is 13.5 kilometres (8.4 miles) long and has a maximum cover of 250 metres (820 feet). The gradient is mainly 1 in 66, except at the passing loop where it decreases to 1 in 200. Five ventilation shafts of 1.8 metres (5 feet 11 inches) diameter and with a combined length of 1,000 metres (3,281 feet) were sunk. The cross-sectional area of the horseshoe profile single line tunnel is 30 square metres (323 square feet), but this increases to 66 square metres (710 square feet) at the passing loop. Tunnel no. 4 also contains relay rooms for signalling equipment.
The tunnel system became operational in April 1989, more than forty years after the first portals were sunk, and was officially opened on 27 November 1989. The completed four-tunnel system now boasts the longest railway tunnel system in Africa.
Tunnel 4 was the longest railway tunnel in Africa until 2009. The present longest single railway tunnel in Africa is 15.5 kilometres (9.63 miles) long, on the Gautrain line between Johannesburg Park Station and Marlboro Portal, which was broken through in September 2009.
Upon the opening of the new route, the line was effectively doubled since the original line across the pass was retained. As a result of already diminishing traffic volumes due to competition from road transport, however, the old Hex River rail pass line was closed to rail traffic and the electrification infrastructure was removed when the Hexton line was opened. A large part of the track between Matroosberg and Osplaas stations was left in place, however, and is now being utilised as a popular tourist destination known as the Hexpas Ecotrek.