Today, the place where Nairobi is was originally a part swamp occupied by the Masaai, a nomadic tribe, and the Kikuyu people. On the arrival of the Uganda Railway, this site was selected for store depot, shunting ground and camping ground for the Indian labourers.
In 1900 it was rebuilt due to an outbreak of plague. Later in 1907, Nairobi turned into a commercial centre and became the capital of British East Africa by replacing Mombasa. Nairobi flourished under British rule and also became a home for many Britons. In 1919, it was declared a municipality. In 1921, Harry Thuku established the Young Kikuyu Association and began organising protests against the British; he was arrested on 14th March 1922. There was a general strike by thousands of Africans in Nairobi, and the British government started shooting the Protestants. The Massacre shocked people worldwide, along with the British.
Towards the end of World War II, the strife resulted in a Mau Mau Uprising. There was pressure on the British from the local people that led to Kenyan Independence in 1963. Nairobi became the capital of the new republic.