# History of rail transport in Tanzania

Rail transport in Tanzania began in the late 19th century.

## Zanzibar

From about 1880 to 1888, a tramway operated in Zanzibar, then ruled by the second Sultan of Zanzibar, Barghash bin Said.
In 1905, a second tramway was built, this time by a US company. It lasted until 1930.

## Tanganyika
### German colonial period

The first railway lines in Tanganyika, known at the time as German East Africa, were built soon after the first tramway in Zanzibar.
In 1891, the Eisenbahngesellschaft für Deutsch-Ostafrika (English: Railway Company for German East Africa) was established, with the goal of building a railway from Tanga in Tanganyika to the hinterland. For that, and subsequent, main lines in the German colony, the gauge selected was 1,000 mm (3 ft 3+3⁄8 in) metre gauge. In addition, light railways were developed for individual Tanganyikan sisal plantations in narrower gauges, usually 600 mm (1 ft 11+5⁄8 in) gauge.
The construction of the Usambara Railway, from Tanga to the hinterland, began in 1893. However, the company building that railway went into bankruptcy after two years. At that stage, only 40 km (25 mi) of track had been completed, as far as Korogwe. The treasury of the colony then took over the project in 1899. Four years later, in 1903, it issued an Order for further construction. Subsequently, there were other attempts to operate the railway on an economically and juristically stable footing.
In 1904, the smaller railways received a boost. Meanwhile, in Germany, the Sigi-Eisenbahngesellschaft (English: Sigi Railway Company) was established, with the objective of constructing one of the narrow gauge railways branching off the Usambara Railway, the Sigi-Bahn, in 750 mm (2 ft 5+1⁄2 in) gauge. The same year, 1904, the Ostafrikanische Eisenbahngesellschaft (English: East African Railway Company) (OAEG) was formed to promote a railway from Dar es Salaam in the direction of Lake Tanganyika, the Zentralbahn (English: Central Line). Kigoma was reached on 2 February 1914, on the eve of World War I. Later in 1914, work began on the Ruandabahn, a line from Tabora to the territory that was later to become Rwanda. This project was thwarted by the outbreak of World War I.

### East African Campaign

During World War I, German and Allied forces engaged in the East African Campaign, a series of battles and guerrilla actions which started in German East Africa. Towards the end of 1915, the Allies decided to build a railway from Voi, Kenya, a station on the Uganda Railway, to Maktau, as a supply route for a full-scale invasion of the German colony, including an offensive down the Usambara Railway to Tanga. Subsequently, the line was extended to Kahe, a station on the Usambara Railway near Moshi, Tanganyika. As both the Uganda Railway and the Usambara Railway were metre gauge, the transfer of vehicles from one of these lines to the other thus became readily achievable.
By September 1916, both the Usambara Railway and the Central Line from the coast at Dar es Salaam to Ujiji were fully under Allied control.

### British mandate

After the Armistice in 1918, the British occupied Tanganyika was granted to the United Kingdom as a League of Nations mandate. On 1 April 1919, the new colonial administration established Tanganyika Railways and Port Services as the operator of the railways in the mandated territory.
In 1928, the Tabora–Mwanza railway was completed with the assistance of the German pre war preparations for the Ruandabahn. In 1930, the Usambara Railway was extended to Arusha. In 1948, a branch line from the Central Line was opened between Msagali and Hororo, and in 1949/1950 the Kaliua–Mpanda line was opened. As early as 1951, the line to Hororo was closed.
In 1948, Tanganyika Railways and Port Services was merged with its counterparts in Uganda and Kenya to form the East African Railways and Harbours Administration (from 1969: East African Railways Corporation).
From 1950, the Overseas Food Corporation established the 610 mm (2 ft) Southern Province Railway in the south of Tanganyika. It linked the port of Mikindani with the growing regions for the Tanganyika groundnut scheme in the hinterland. Eventually the network reached a total length of more than 250 km (155 mi). In 1952, it was transferred to the East African Railways and Harbours Administration.

## Republic of Tanzania

In a series of steps between 1961 and 1964, Tanganyika became independent and united with Zanzibar in a federation. Meanwhile, the existing network was expanded. In 1963, a coastal railway was constructed to link the Central and the Usambara Railway, and in 1965 a branch line was opened southwards, from Kilosa, on the Central Line, to Kidatu. In 1963, the narrow gauge network in southern Tanganyika was shut down.
From 1964, discussions took place about a proposed railway line between Tanzania and Zambia. As Great Britain had not shown any interest in the proposal, the People's Republic of China joined in. The PRC government sponsored construction of the railway specifically to eliminate Zambia's economic dependence on Rhodesia and South Africa. The contractual foundations were closed in 1967, and one year later, the Tanzania-Zambia Railway (TAZARA) was established, as a condominial railway owned by Tanzania and Zambia.
The TAZARA was built in 3 ft 6 in (1,067 mm) which was new for Tanzania, but common in southern Africa. The line was handed over to the company as it was completed in sections in 1973 and 1974. In 1976, a branch line was opened to Kidatu, where the metre gauge branch line from the Central Line ends.
In 1977, in light of the different policies and widening standards of economic development in its participating countries, the East African Union broke up, and all of its joint structures were also dissolved. The Tanzanian Railways - except the TAZARA - was reorganised as Tanzania Railways Corporation (TRC). Economically, the network then went constantly downhill, due to increasing road traffic, corruption and political neglect. A number of rail links, such as between Arusha and Moshi, were shut down, and passenger services abandoned, including on the Usambara Railway.
The TAZARA has been a major economic conduit in the region. However, it has never been profitable and more recently it has suffered from competition from road transport (such as the Trans–Caprivi Highway and Walvis Bay Corridor to Namibia) and the re-orientation of Zambia's economic links towards South Africa after the end of apartheid. As of October 2008, a Tanzanian newspaper described the TAZARA's condition as being "on the verge of collapse due to financial crisis", with the operator being three months late on paying worker's wages and most of its 12 locomotives being out of service. At the beginning of 2010 the Chinese government gave the financially crippled operator a US$39 million interest-free loan to revive its operations.
Meanwhile, in 2007 RITES Ltd. of India won a contract from Tanzania's Parastatal Sector Reform Commission (PSRC) to operate the TRC's passenger and freight services on a concession basis for 25 years. The concession agreement was signed on 3 September 2007, and began on 1 October 2007. The services previously operated by the TRC were run as Tanzania Railway Ltd, with the government owning a 49% stake. However, in 2010 the government terminated the agreement and resumed control.