Nairobi, city, capital of Kenya. It is situated in the south-central part of the country, in the highlands at an elevation of about 5,500 feet (1,680 metres). The city lies 300 miles (480 km) northwest of Mombasa, Kenya’s major port on the Indian Ocean. The city originated in the late 1890s as a colonial railway settlement, taking its name from a water hole known to the Maasai people as Enkare Nairobi (“Cold Water”). When the railhead arrived there in 1899, the British colonial capital of Ukamba province was transferred from Machakos (now Masaku) to the site, and in 1905 Nairobi