The country known today as Kenya was created by European colonialism in Africa, which lasted from the mid-1800s to the 1960s. Kenya was a British protectorate from 1895 to 1920 and a colony from 1920 to 1963.

Prior to 1870 the peoples of what is now Kenya were independent of European control; they governed themselves through councils of elders. However, in 1884 the Sultan of Zanzibar, Seyyid Bargash, allowed a trading concession to the British East Africa Company; thus, British interest in East Africa was sparked by private enterprise.

In addition to the British East Africa Company, pioneer missionaries also came to East Africa to spread Christianity and to help abolish the slave trade. An 1886 Anglo-German treaty partitioned East Africa between the two powers, placing the future Kenya in the British sphere and the future Tanzania in the German sphere. In 1888 the British East Africa Company was granted a Royal Charter and renamed the Imperial British East Africa Company (IBEA). The company was given exclusive rights to commercially exploit the British sphere. In 1895 the territory lying between Mombasa and the eastern edge of the Rift Valley (the future Kenya) was declared the East African Protectorate. In 1902, the eastern province of Uganda was added to the East African Protectorate. In 1920 the Protectorate was declared a Crown Colony and renamed Kenya. The name Kenya appears to have come from the Kamba word Kinyaa, meaning "ostrich."

The word "Nairobi" came from the Masai word enairobe, which literally means " stream of cold water. " Nairobi was founded in 1899. It grew up around a railway line constructed by the British colonial officials from Mombasa on the Indian Ocean coast to Uganda. The present site of Nairobi was selected as a stores depot, shunting yard (place where trains are shifted from one track to another), and camping ground for the thousands of Indian laborers (also British colonials, who came to Kenya seeking work) employed by the British to work on the line.

From this point Nairobi developed slowly, unplanned, and unexpectedly. The outbreak of plague and the burning down of the original compound necessitated the town ' s rebuilding. By 1907, Nairobi was firmly established and the colonizers decided to make it the capital of the newly formed British East Africa.

European settlers were encouraged to settle in the country, and Nairobi was their natural choice due to its cool climate and fertile soils. British authorities hoped these settlers would develop a modern economic sector that would enable the railway to pay for itself. Until that happened, the railway scheme seemed a useless venture that would consume more money than was called for in the initial plans. White settlement in the early years of the twentieth century was led by Lord Delamere, a pugnacious farmer from Cheshire, England. The lord and many other pioneer farmers suffered a lot in their farming ventures as little was known of the kind of crops to grow there. By trial and error they established plantations of coffee, tea, sisal (a plant yielding a strong fiber used to make rope), and pyrethrum (a perennial plant yielding flowers used to make insecticide). Cattle rearing also proved to be a profitable undertaking, spurring the establishment of huge ranches. The development of the settler economy allowed the railway venture to reverse its deficits.

Due to high demand for laborers in the established plantations, a system was designed to force Africans to work for Europeans. Until the early twentieth century, most Kenyans were subsistence farmers, growing only enough food to meet their needs. In 1920 the colonial state began to confiscate African land; Africans were taxed, and a cash economy was created, forcing many Africans to give up peasant farming to search for cash incomes by working on the European plantations. The Indians who remained behind after the completion of the railway took up trade as their major occupation.

In the early 1950s, the Mau Mau launched one of the most severe internal wars in Kenya, aimed at removing the British from the country. Although the war was mainly fought in the countryside and mountains surrounding Nairobi, the British launched sweeps of the city to make mass arrests. Africans were the main target of the sweeps—in particular Kikuyu Africans, a somewhat militant interest group focused on such issues as land scarcity, labor passes, regressive taxation, and inadequate educational and employment opportunities. The Mau Mau were defeated only after troops were sent from Britain to

A statue of Kenya's first president, Jomo Kenyatta (1890–1978). ()
Kenya. By 1954 the British enacted Operation "Anvil," an effort to rid Nairobi of Mau Mau supporters. More than 30,000 arrests were made, most of them Kikuyu; of these, 16,000 were detained as active Mau Mau supporters. In 1956, Dedan Kimathi, recognized as the leader of the Mau Mau, was captured, tried, and found guilty; in 1957, he was executed by the British in a Nairobi prison.

Also in 1957, the first elections of African members of the Legislative Council were held. Eight African members were elected and chose not to cooperate with the colonial administration by advocating free and direct elections without preference given to any racial group. In 1958, the eight African council members boycotted council proceedings in a protest against the Lennox-Boyd Constitution, which emphasized a multiracial Legislative Council. They also called for the release of Jomo Kenyatta, who had been arrested as a Mau Mau leader and sentenced to seven years of hard labor in 1952.

In 1960 both the Kenya African National Union (KANU) and the Kenya African Democratic Union (KADU) were formed. In February 1961 primary and general elections were held under the Lancaster House Constitution. KANU won 19 seats and KADU 11. Although still detained, Jomo Kenyatta was named as president of KANU. By October, Kenyatta was released and assumed the presidency.

Between February and April 1962, the second Lancaster House Conference was held in London. A self-government "framework" constitution was agreed upon and drawn to include representation from both political parties. By 1963 Kenya achieved internal self-government with Kenyatta as the first prime minister. The third Lancaster House Conference was held to finalize the constitution for the granting of independence; the conference also declared Kenya a dominion. On December 12, 1963, Kenya finally became an independent state.

President Kenyatta died in 1978 and was succeeded by his vice president, Daniel arap Moi. Moi became both the second president and head of KANU. Sworn in for a five-year term, he ruled as a dictator, and his government was marked by human rights abuses, corruption, ethnic clashes, economic deterioration, and inept governance.

In January 1993, Moi was sworn in for his fourth five-year term in office. By July public rallies were being held to protest Moi's human rights abuses and to demand constitutional reforms. For the first time in Kenya, the police entered All Saints Cathedral in Nairobi and beat the demonstrators seeking sanctuary there.

One of the most shocking single-day events in Nairobi ' s history was the U.S. Embassy bombing on August 7, 1998. Nairobians were stunned by the tragedy, in particular because the terrorist attack had nothing to do with their country. In simultaneous attacks on the U.S. Embassies in Nairobi and Dar es Salaam, Tanzania, 227 people were killed, including 12 Americans, and over 5,000 injured. The bulk of those injured and killed were Kenyans as the U.S. Embassy was located at a busy intersection near the railway station. A neighboring four-story building collapsed during the mid-morning work-day attack. The attacks were apparently orchestrated by Osama bin Laden, a wealthy Saudi Arabian who has dedicated his life to attacking American interests. In the aftermath of the bombing, Kenyan and other governments worked closely to rescue survivors, find victims, and apprehend suspects.