The area Nairobi currently occupies was essentially an uninhabited swamp until a supply depot of the Uganda Railway was built by the British in 1899 linking Mombasa to Uganda. The location of the camp was chosen due to its central position between Mombasa and Kampala.
It was also chosen because its network of rivers could supply the camp with water and its elevation would make it cool enough for residential purposes for not only the thousands of Indian laborers who came to Kenya seeking to be employed to work on the railway line but also for the British settlers.
With such an apt location, it had soon grown big enough to become the railway’s headquarters.