# History of rail transport in Namibia

The history of rail transport in Namibia began with a small mining rail line at Cape Cross in 1895. The first major railway project was started in 1897 when the German Colonial Authority built the 600 mm (1 ft 11+5⁄8 in) gauge Staatsbahn (State Railway) from Swakopmund to Windhoek. By 1902 the line was completed.
Parallel to this government initiative, the Otavi Mining and Railway Company (O.M.E.G.) was established. It built another 600 mm (1 ft 11+5⁄8 in) gauge line, the Otavibahn, from Swakopmund to Tsumeb via Otavi between 1903 and 1906, and a branch from Otavi to Grootfontein in 1907/08.
The German colonial railway was taken over by the Railways of South Africa after World War I, and linked into the network of South Africa. After the independence of Namibia, TransNamib took control of the national rail network, which, by that time, had long since been converted to 3 ft 6 in (1,067 mm) gauge.

## German colonial period
### Beginnings

The basic structure of the Namibian railway system dates from the time when the country was a colony of the German Empire known as German South West Africa.
This arid part of the African continent was not very productive for agriculture. Initially, overland transport was operated entirely by ox-cart. A small mining rail line opened at Cape Cross in 1895. Soon afterwards, the ox-cart transport system totally collapsed, in the wake of a rinderpest epidemic in 1897.
As it was necessary to react quickly to the now extremely precarious transport situation, decisions were made:
* to build a railway line from the German port of Swakopmund to Windhoek,
* to use existing, 600 mm (1 ft 11+5⁄8 in) gauge military Feldbahn material, and
* to entrust a railway brigade with the construction work, which began in September 1897.
Train services on the whole of the new line, which was called the Staatsbahn (State Railway), began on 19 June 1902.

### Network development

Construction of the railways connecting with the Staatsbahn was aimed partly at military strategic objectives following the uprising of the Herero and Nama, and partly at economic requirements.
By World War I, the following lines had been developed (listed by first year of full operation):
* 1902: Swakopmund–Windhoek line, 600 mm (1 ft 11+5⁄8 in) gauge, Karibib–Windhoek section regauged in 1911 to 3 ft 6 in (1,067 mm) gauge.
* 1906: Otavibahn, 600 mm gauge.
** 1905: Onguati–Karibib branch.
** 1908: Otavi–Grootfontein branch.
* 1907: Lüderitzbahn, 3 ft 6 in (1,067 mm).
** 1909: Seeheim–Kalkfontein branch.
* ca 1911: Kolmannskuppe–Elisabethbucht–Bogenfels, industrial railway of the diamond fields.
* 1912: Windhoek–Keetmanshoop railway, 3 ft 6 in (1,067 mm) gauge.
** 1912: Rehoboth shuttle, 600 mm (1 ft 11+5⁄8 in) gauge (questionable).
* 1914: Otjiwarongo–Outjo–Okahakana, 600 mm gauge (project started, but not completed due to the war).

### Industrial railway of the diamond fields

The 600mm gauge industrial railway of the diamond fields, between Kolmannskuppe and Bogenfels, was electrified from 1911, and thus became, to this day, the only electric railway in Namibia. As the diamond mining was always moving further south, the northern part of the line as far as Pomona was abandoned in 1931, and some of its materials were used for the extension of the railway towards Oranjemund. The southern section was operated with diesel traction.
The industrial railway no longer exists today; the lifting of the line was carried out by bulldozers and trucks.

## World War I and after

With the outbreak of World War I, the German Schutztruppe military unit retreated from the coast, and withdrew into the inland. In the process, the Schutztruppe destroyed the Otavibahn, and the old Staatsbahn towards Karibib, as far as Rössing. British troops immediately moved forward from the British enclave of Walvis Bay, and by the end of 1914 they had built a 37 km (23 mi) long 3 ft 6 in (1,067 mm) railway to Swakopmund. The Otavibahn was also reconstructed in 3 ft 6 in (1,067 mm) as far as Usakos, and the section between Usakos and Karibib was realigned. The network north of Usakos remained in 600 mm (1 ft 11+5⁄8 in) gauge; the workshop for both gauges was consolidated in Usakos, and the one in Karibib was closed.
Neighbouring South Africa was also an enemy of the German Empire. From there, a new railway was constructed – as an extension of the De Aar-Prieska railway – to achieve a secure supply route for the South African troops. In 1916, the line was connected to the German network at Kalkfontein (now Karasburg).

### Network expansion

Under South African/British occupation, the following lines were established (listed by first year of full operation):
* 1914: Walvis Bay–Swakopmund in 3 ft 6 in (1,067 mm).
* 1915: Swakopmund–Karibib: Reconstruction in 3 ft 6 in (1,067 mm).
* 1915/1916: (De Aar)–Nakop (border)–Kalkfontein in 3 ft 6 in (1,067 mm).
* 1921: Otjiwaronge–Outjo 600mm gauge (based on German preparations).
* 1929: Windhoek–Gobabis railway in 3 ft 6 in (1,067 mm).
* From 1958: the Otavibahn north of Usakos was gradually regauged to 3 ft 6 in (1,067 mm), with the new line being laid parallel to the existing line, but largely on new foundations; the new line was in operation from 1961.

### Mandate period

From August 1915 the Namibian railway network was operated de facto by South African Railways, and this arrangement became official in 1922.
From 1959, steam locomotives were gradually replaced by diesel locomotives, for which an engine-house was built in Windhoek. This made operations very much easier, because water is in short supply in Namibia, and the coal needed to heat the water in the steam locomotives also had to be procured from the Transvaal.

### Independence

After the independence of Namibia, TransNamib took control of the national rail network.