The very first railway in present day Tanzania was a 2ft (610mm) gauge line on the island of Zanzibar, opened in 1879 by the Sultan to connect his summer palace at Chukwani with Zanzibar town. Initially the Pullman cars were drawn by mules, but in 1881 a steam locomotive was purchased. The line closed in 1888 on the death of the Sultan. A public railway opened on the island in 1905, closing in 1930.
The first railway on the mainland (German East Africa) was opened in 1893 between the Indian Ocean port of Tanga and a point near Makuyuni, serving Wilhelmstal (present day Lushoto) in the Usambara Highlands, a distance of 108km. In line with then current German practice for light railways, it was constructed to metre gauge, as were most later railways in the country.
One little known railway opened in 1949 in connection with a groundnut planting scheme at Nachingwea in the south of the country. A 100 mile (160km) railway was built from Nachingwea to a new port facility at Mtwara, specially built for the export of nuts and oil. Given the failure of earlier groundnut schemes, the experiment may be seen as somewhat surprising and, indeed, production of groundnuts quickly gave way to cashew nuts. Later, there were flirtations with growing soybeans and sesame seeds before the scheme, and the railway, was finally abandoned in 1962. The tracks were recovered and used to provide a previously missing link between the Central main line and the Tanga line.
A major new development took place in 1975 with the opening of the TAZARA line from Kapiri Mposhi in northern Zambia to Dar es Salaam in Tanzania. This prestigious 1850km railway was motivated in part by continued civil unrest in Angola and the Congo, which had resulted in the Benguela Railway being severed at the Zambian frontier. The new line was built to the Zambian gauge of 3ft 6in (1067mm), as its principal function was to allow exports from Zambia to reach the port of Dar. The line is owned by the states of Tanzania and Zambia and operated by a joint corporation.
Most of the original metre gauge network remains open. However, the line from Moshi to the Kenyan border at Taveta, with its link to the Kenyan Railways system, is closed. A branch from Kilosa to Kidatu allows freight transhipment to and from TAZARA at the Kidatu, transhipment at Dar being impractical owing to the distance between the two stations there (some 8km). Passenger services operate on the main line from Dar via Tabora to Mpanda and Mwanza. TAZARA has its own passenger services.
In 2011 an agreement was signed for the development of iron ore mining in the Lignaga area and coal mining in the Mchuchuma area. While much of the coal would be used locally for power generation, a new railway would be required for the export of coal and processed iron ore. In 2015, a contract was awarded for the construction of a 1000 km line connecting the mines with the port of Mtwara.
In 2012 the African Development Bank provided funding for work to commence on projects to create a new standard gauge network which would largely replace the existing metre gauge network and extend into Rwanda and Burundi. Construction of an initial 205km section from Dar es Salaam to Morogoro commenced in 2017.
Flag image from CIA World Factbook