Construction commenced in 1907 and a "breakthrough" celebration was held on 21 August 1918 by the Minister of Public WorksSir William Fraser. When the tunnel opened on 4 August 1923, it was the seventh longest tunnel in the world and the longest in the British Empire. The Midland Railway Company investigated options to a long tunnel, but a line over the pass with gradients of 1 in 50 on both sides was not practical. Other options for a line over the pass were a cable-hauled system or a line of 1 in 15 gradient using either the Fell system or a rack railway using the Abt system. However, the government did not favour the Fell system as used on the Rimutaka Incline which was expensive to operate. After taking over the line the government decided in 1900 on a 10 km long straight tunnel with a gradient of 1 in 37, but after expert advice opted two years later for an 8.55 km tunnel at the slightly steeper gradient of 1 in 33. A contract to build the tunnel in five years was let to the engineering firm of John McLean and Sons who started at the Otira end in 1908, using the “drill and blast” method. With progress difficult and slow McLeans asked to be relieved from the contract in 1912, and were financially ruined. The government could find no other tenderers, so the work was taken over by the Public Works Department. The government considered halting construction in World War I, but the Imperial Government requested that work should continue in case the German navy blockaded the West Coast ports used for coal shipment. The breakthrough was on 20 July 1918, but concrete lining took a further three years, and then two more years before the tunnel opened. There were eight fatalities during construction. Its opening was marked by the British and Intercolonial Exhibition.
Electrification
The tunnel dimensions were high and wide at rail level, increasing to at the widest point. Because of its length and gradient, gases such as carbon dioxide and carbon monoxide could easily build up, potentially making the tunnel both unhealthy for the train's occupants and unworkable with steam engines. Thus, the tunnel was electrified with a 1500 V DCoverhead system. A small coal-fired power station was built near Otira to provide electricity until 1941 when it was replaced by a connection to the national grid. The locomotives used were the EO class, then from 1968 the EA class. In 1988, trials began using DX class locomotives instead of electric locomotives. While the trials were unsuccessful, it was found in trials held in 1991 that upgrading the DX locomotives with new air intakes and putting extraction fans on the end of the Otira tunnel could allow for the replacement of the electrification. Because of the increasing age of the electrification and the availability of upgraded DX class diesel locomotives, the electrification was decommissioned in 1997 and the equipment removed. This marked the end of electrification in the South Island. To overcome the fume problem, a combination of a door and fans are used, similar to that used in the Cascade Tunnel in the United States of America, which was also once electrified. After a train enters the tunnel from the Otira end the door closes off the entrance, and a large fan extracts the fumes behind the train. Once the fumes have been extracted, the door is reopened. Because of the fumes, the TranzAlpine's observation cars are closed for the trip through the tunnel.