The tunnel is located some 113 km from Quetta on the Quetta-Chaman Railway line. Khojak pass itself is located across the Khwaja-Amran offshoot of the Toba-Kakar Mountains. The tunnel is located between the towns of Sanzala and Shelabagh. It is called the Khojak tunnel. Built 115 years ago (September 1891), it was then the fourth longest tunnel in the world and to date it is the longest tunnel in Pakistan. The total Length of Khojak tunnel is 3.912km (2.415 miles).
The tunnel is mostly straight but there are vertical grades. Starting from Shelabagh the line first rises at 1 in 1000 grade, then it levels off for a while before growing downward at 1 in 500, 1 in 88 and 1 in 40 grades.The British captured Quetta and its adjoining area in 1876 and formed the Kandahar State Railways with an aim to connect Sukkur (Sindh) with Kandahar (Afghanistan).
Work began in 1879. However, by 1888, the idea of building the railway line up to Kandahar was dropped. The project was renamed Chaman Extension Railway. The railway line would now go up to Chaman only. Chaman is the last Pakistani station on Pak-Afghan border. To reach Chaman, the railway line had to pass through the Khojak pass which was an unsurmountable obstacle at that time.
Hence it was decided to tunnel this pass, and the project was named as Khojak Tunnel. At the time of construction of this tunnel, there was no skilled labour available for the job in India. Equipment and ironworks had to be ordered from England. An army of laborers was recruited from all parts of India as well as other countries.
The workers for Khojak Tunnel came from Herat, Siesta, Kandahar, Ghazni, Kabul, Jalalabad, Swat, Bannu, Kafiristan, Kashmir, Tibet, Punjab, Makran, Arabs from the Persian Gulf and Zanzibar. There were a large number of Hazara people as well as Sikh carpenters and masons and brick burners from Bengal. 65 Welsh miners were especially recruited for the Khojak Tunnel project, who had experience in building the Severn Tunnel through the treacherous water-bearing strata of England.