Present-day Kenya is inhabited since around 1000 by Bantu tribes, followed since 1500 by the Masai and the Luo. Cushitic-speaking people from northern Africa move into present-day Kenya beginning around 2000 BC. Arab traders begin frequenting the Kenya coast around the first century A.D. Kenya's proximity to the Arabian Peninsula invite colonization, and Arab and Persian settlements sproute along the coast by the eighth century. During the first millennium A.D., Nilotic and Bantu peoples moved into the region, and the latter now comprises three-quarters of Kenya's population. Arab dominance on the coast is eclipsed by the arrival in 1498 of the Portuguese, who give way in turn to islamic control under the Oman in the 1600s, later from Zanzibar. The United Kingdom establishes its influence in the 19th century.

In 1887 Zanzibar grants coastal areas in Kenya to the British East Africa Association. The United Kingdom proclaims in 1895 the British East Africa Protectorate, including large areas in the hinterland. Uganda is seceded from British East Africa in 1905 and in 1920 British East Africa is restyled into the Kenya Colony and Protectorate. The settlers are allowed a voice in government even before 1920, but Africans are prohibited from direct political participation until 1944. From 1952 until 1959 the Mau Mau fight a resistance war agains Britain. From October 1952 to December 1959, Kenya was under a state of emergency arising from the "Mau Mau" rebellion against British colonial rule. During this period, African participation in the political process increased rapidly. Only as late as 1957 the non-whites get representation in the legislative institutions. The government is led by of Jomo Kenyatta.

In 1960 Kenya gets self-government and parliamentary democratic institutions, followed in 1963 by independence as the Kenya, a monarchy in the Commonwealth of Nations. Jomo Kenyatta of the Kenya African National Union (KANU) becomes Kenya's first prime minister. A year later Kenya becomes a republic named Republic of Kenya with Kenyatta as president. The minority party, the Kenya African Democratic Union (KADU), representing a coalition of small ethnic groups that had feared dominance by larger ones, dissolves itself voluntarily in 1964 and joins the KANU. A new opposition party, the Kenya People's Union (KPU), is formed in 1966, but banned in 1969. No new opposition parties are formed after 1969 and the KANU becomes the sole political party. At Kenyatta's death in 1978, Daniel arap Moi becomes president. In 1982 Kenya becomes officially a one-party state.

However in 1991, parliament repeals the one-party section of the Constitution. By early 1992, several new parties are formed and multiparty elections are held in 1992. Moi is reelected for another 5-year term. Opposition parties win about 45% of the parliamentary seats, but Moi's KANU retains a majority of the legislature. Parliamentary reforms in 1997 expand political rights and the number of political parties grows rapidly. Moi is reelected in 1997 elections and the KANU retains its parliamentary majority. In 2002 Mwai Kibaki of the conservative Democratic Party (DO), member of the 15-party group National Rainbow Coalition (NARC), is elected as the country’s third president.