Nairobi is the capital and largest city of Kenya. It stands in the south-central part of the country, on a highland plateau about 1,795 metres above sea level, near the eastern edge of the Great Rift Valley. The 2019 census counted 4,397,073 people in Nairobi City County, and the metropolitan area is much larger. Nairobi did not grow from an old town. It began in 1899 as a depot on the railway from Mombasa to Lake Victoria, and it was made capital in 1907 largely because the railway and the colonial administration had already moved there. The city is often described as the only capital in the world with a national park inside its boundaries.
George Whitehouse's Railway Depot on the Athi Plains, 1896–1901
The Uganda Railway, begun at Mombasa in 1896, was built to link the Indian Ocean coast to Lake Victoria. Its chief engineer, Sir George Whitehouse, needed somewhere to set up a store depot, a shunting yard and a camp for the Indian labourers building the line. He chose a flat, swampy spot at the edge of the Athi plains. Maasai herders used the land, Kikuyu farmers worked the forested highlands above it, and Akamba traders passed through. The Maasai called the stream there Enkare Nyirobi, "cool waters", and that is where the name Nairobi comes from.
Whitehouse gave his reasons. The site was high, the climate was temperate, there was enough water, and it lay just before the steep climb up the Limuru escarpment. Officials in the protectorate government disagreed. They thought the ground was too flat, badly drained and not very fertile, and events partly proved them right. In 1898 Arthur Church drew the first town plan. It had two streets, Victoria Street and Station Street, ten avenues, staff housing and an Indian commercial quarter. The railway arrived on 30 May 1899, and Nairobi soon replaced Machakos as the headquarters of Ukamba province.
The early town had serious problems. Malaria was common enough that there was at least one attempt to move the settlement somewhere else. In 1900 bubonic plague broke out, and the original town was burned down and rebuilt. Bazaar Street, now Biashara Street, was entirely rebuilt as part of that. But the railway kept the town where it was. In 1901 the railway moved its headquarters from Mombasa to Nairobi, which brought the workshops, the offices and the staff.
1907: Why the Capital Left Mombasa for the Highlands
Mombasa had been the first capital of British East Africa. It was an old Swahili port with an Indian Ocean harbour, and the railway began there. What it lacked was the new economy growing up inland. In 1897 Hugh Cholmondeley, Lord Delamere, arrived in the Kenya highlands and led white settlement there. In 1902 the East Africa Syndicate was granted 1,300 square kilometres to promote white settlement in the Highlands, and in 1905 a large number of new settlers arrived from England and South Africa. The colonial government's plans were now centred on the cool highlands along the railway, and Nairobi was the town that served that region. It grew around administration and around tourism, which at first meant big-game hunting. Its population rose from about 5,000 in 1902 to 16,000 in 1910.
In 1907 Nairobi officially replaced Mombasa as capital of the East Africa Protectorate (some accounts date the transfer to 1905). Nothing new had to be built for the move. The railway offices and the provincial headquarters were already there, and naming it the capital only confirmed what had already happened. Nairobi became a municipality in 1919. By 1921 it had 24,000 residents, about half of them Africans. Over the following decade the African population became the majority for the first time, and the planning team led by Thornton White described the strain this put on the town as the "Nairobi Problem".
The colonial government's 1948 Master Plan was designed for a city of 250,000 people and set aside 28 per cent of the land as public space. It is still the main framework for planning decisions in Nairobi today. On 30 March 1950 Prince Henry, Duke of Gloucester, presented a Royal Charter giving Nairobi city status, which marked 50 years of local government. The same year the East African Trades Union Congress led a nine-day general strike in the city. After the Second World War, anger among the Maasai and Kikuyu over the city's continuing expansion fed into the Mau Mau uprising of the 1950s and then the Lancaster House conferences that prepared the way for independence.
12 December 1963: Why Independent Kenya Kept Nairobi
Kenya became independent on 12 December 1963 and kept Nairobi as its capital. The railway headquarters, the ministries, the banks and the airport were all already in Nairobi, and the city had held a royal charter since 1950. Most European residents left, and the new African elite and civil servants took over their houses. The population grew from about 348,000 in 1965 to 531,000 in 1970, as people moved in from rural areas. Power cuts and water shortages became common.
The independent government built the capital up with landmarks of its own. The Kenyatta International Conference Centre (now called a Convention Centre) opened in September 1973 beside City Square. It was designed by the Norwegian architect Karl Henrik Nøstvik and the Kenyan David Mutiso, and it was Nairobi's tallest building until the Teleposta Towers were built. When it opened, its halls were the largest in eastern and central Africa, and it is still listed among the leading conference venues in Africa. The Parliament Buildings, City Hall and the law courts are around the same square. On 14 March 1978 President Jomo Kenyatta opened a new airport terminal, less than five months before he died, and the airport now carries his name.
The biggest win came in 1972. After the Stockholm Conference, the United Nations had to decide where to put the headquarters of its new environment programme, UNEP. Developed countries wanted Geneva. Developing countries backed Nairobi, since it would be the first international organisation headquartered in the Global South, and Mexico City, New Delhi and Cairo pulled out to support it. Nairobi won. Its role grew further when the United Nations Office at Nairobi was set up in 1996 as the UN's official headquarters in Africa. UN-Habitat is also based there. The city also has painful memories from this period. In August 1998 the US embassy downtown was bombed, and the site is now a memorial park.
Nairobi National Park to the Expressway: What Being Capital Means Now
Under the county system created by Kenya's 2010 constitution, Nairobi became Nairobi City County, one of 47 counties. It covers about 696 square kilometres and is among the smallest by area but the largest by population. It is home to the Parliament Buildings, State House and the Supreme Court. According to the Kenya National Bureau of Statistics, the county alone produces about 27.5 per cent of Kenya's GDP, and the wider metropolitan region, which spreads into parts of five counties, produces about 40 per cent. The Nairobi Securities Exchange is the second-oldest stock exchange in Africa.
That concentration means heavy traffic and inequality. Much of the recent building has gone into roads and rail. The Thika Superhighway, 50.4 kilometres long, opened in November 2012. The Mombasa–Nairobi Standard Gauge Railway started passenger services on 31 May 2017, running parallel to the old line along which the city first grew. The Nairobi Expressway on Mombasa Road was completed in 2022. At the other end of the scale is Kibera. The government puts its population at 185,777, but non-governmental estimates range from 500,000 to one million.
The layout of the colonial capital can still be seen on a map. Most of the expensive suburbs, including Karen, Langata, Lavington, Muthaiga, Runda and Gigiri, are in the west and north-central parts of the city, where European settlers lived in colonial times. The lower-income estates, such as Dandora, Kayole, Umoja and Kariobangi, are mainly in the far east. The western suburbs run for about 20 kilometres from Kenyatta National Hospital in the south to the UN complex at Gigiri. Eastleigh, where many Somali immigrants have settled, is known as "Little Mogadishu".
The plains that Whitehouse chose are still partly wild. Nairobi National Park was set up in 1946 about 7 kilometres south of the centre. It is fenced on three sides and open to the south, so animals can move between the park and the Kitengela plains, and it is one of Kenya's most successful rhino sanctuaries. To the north, the Nobel laureate Wangari Maathai campaigned to save Karura Forest from development. The Ngong Hills to the west are the most prominent landmark in the area. Nairobi's altitude still gives it the mild subtropical highland climate that first attracted the railway builders, even though it lies close to the equator. Daytime highs from December to March average about 28°C, and nights in June and July can fall to 9°C.
The coastal city that gave up the capital is still Kenya's main gateway to the sea, as our guide to the Port of Mombasa shows. The escarpment that Whitehouse's railway had to climb west of the city is part of the Great Rift Valley. To see how the skyline behind the giraffes keeps rising, read our guide to the tallest building in Nairobi.
Quick Facts About Nairobi
- Country: Kenya
- Continent: Africa (East Africa)
- Country population: approximately 58.6 million
- Capital city status: Nairobi is the capital of Kenya, the seat of national government, and the location of foreign embassies, parliament, and the head of state's official residence.
Frequently Asked Questions
What is the capital of Kenya?
The capital of Kenya is Nairobi. Nairobi is the seat of national government, hosts most foreign embassies and consulates, and is typically where the head of state and parliament are located.
What continent is Nairobi in?
Nairobi, the capital of Kenya, is located in Africa, in the East Africa region. As Kenya's capital, Nairobi serves as the country's primary connection to the broader African political, economic, and cultural sphere.
Why is Nairobi the capital of Kenya?
Nairobi was chosen as the capital of Kenya for reasons that typically combine geography, history, and politics. Capital city selections often reflect a desire for centrality (being accessible from across the country), historical importance (being a longstanding seat of government or culture), or neutrality (being acceptable to multiple regions or ethnic groups within the country). The specific reasons for Nairobi's designation are detailed in the city's history above.
What is Nairobi known for?
As the capital of Kenya, Nairobi is best known for housing the country's central government institutions — parliament, presidential or royal residences, supreme court, and key ministries. It is also typically a major cultural and economic center within Kenya, hosting national museums, embassies, and signature monuments. The introduction and history sections above provide detailed coverage of the city's specific notable institutions and landmarks.
Related Pages
- Kenya Country Guide — full geography, climate, economy, and culture overview
- Flag of Kenya — meaning, history, and design of Kenya's national flag
