
Thehistory of rail transport in Namibia began with a small mining rail line atCape Cross in 1895. The first major railway project was started in 1897 when theGerman Colonial Authority built the600 mm (1 ft 11+5⁄8 in) gaugeStaatsbahn (State Railway) fromSwakopmund toWindhoek. By 1902 the line was completed.
Parallel to this government initiative, theOtavi Mining and Railway Company (O.M.E.G.) was established. It built another600 mm (1 ft 11+5⁄8 in) gauge line, theOtavibahn, from Swakopmund toTsumeb viaOtavi between 1903 and 1906, and a branch from Otavi toGrootfontein in 1907/08.[1]
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 to3 ft 6 in (1,067 mm) gauge.
The basic structure of the Namibian railway system dates from the time when the country was acolony of theGerman Empire known asGerman South West Africa.
Thisarid 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 arinderpest epidemic in 1897.
As it was necessary to react quickly to the now extremely precarious transport situation, decisions were made:
Train services on the whole of the new line, which was called theStaatsbahn (State Railway), began on 19 June 1902.

Construction of the railways connecting with theStaatsbahn was aimed partly at military strategic objectives following theuprising of the Herero and Nama, and partly at economic requirements.
ByWorld War I, the following lines had been developed (listed by first year of full operation):
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 asPomona was abandoned in 1931, and some of its materials were used for the extension of the railway towardsOranjemund. The southern section was operated withdiesel traction.
The industrial railway no longer exists today; the lifting of the line was carried out bybulldozers andtrucks.

With the outbreak of World War I, the GermanSchutztruppe military unit retreated from the coast, and withdrew into the inland. In the process, theSchutztruppe destroyed theOtavibahn, and the oldStaatsbahn towardsKaribib, as far as Rössing. British troops immediately moved forward from the Britishenclave ofWalvis Bay, and by the end of 1914 they had built a 37 km (23 mi) long3 ft 6 in (1,067 mm) railway to Swakopmund. TheOtavibahn was also reconstructed in3 ft 6 in (1,067 mm) as far asUsakos, and the section between Usakos and Karibib was realigned. The network north of Usakos remained in600 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 theDe 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 (nowKarasburg).

Under South African/British occupation, the following lines were established (listed by first year of full operation):[3]
From August 1915 the Namibian railway network was operated de facto bySouth African Railways, and this arrangement became official in 1922.
From 1959, steam locomotives were gradually replaced by diesel locomotives, for which anengine-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 theTransvaal.
After the independence of Namibia,TransNamib took control of the national rail network.
Media related toHistory of rail transport in Namibia at Wikimedia Commons