During the 1950s and 60s, the anthropologist L. S. B. Leakey discovered in N Tanzania the remains of hominids who lived c.2 million years ago. These persons, perhaps the earliest humans on earth, most likely also inhabited S Kenya. In the Kenya highlands, the existence of farming and domestic herds can be dated to c.1000 B.C. Trade between the Kenya coast and Arabia was brisk by A.D. 100. Arabs settled on the coast during medieval times, and they soon established several autonomous city-states (including Mombasa, Malindi, and Pate). Farmers and herders traveled S from Ethiopia and settled in Kenya in c.2000 B.C. There is also evidence that Bantu-speaking people and Nilotic speakers from what is now South Sudan settled in Kenya between 500 B.C. and A.D. 500.
The Portuguese first visited the Kenya coast in 1498, and by the end of the 16th cent. they controlled much of it, including Mombasa. However, in 1729, the Portuguese were permanently expelled from Mombasa and were replaced as the leading power on the coast by two Arab dynasties: the Busaidi dynasty, based first at Masqat (in Oman) and from 1832 on Zanzibar, and the Mazrui dynasty, based at Mombasa. The Busaidi wrested Mombasa from the Mazrui in 1837. From the early 19th cent. there was long-distance caravan trading between Mombasa and Lake Victoria.
Beginning in the mid-19th cent., European explorers (especially John Ludwig Krapf and Joseph Thomson) mapped parts of the interior. The British and German governments agreed upon spheres of influence in E Africa in 1886, with most of present-day Kenya passing to the British. In 1887, a British association received concessionary rights to the Kenya coast from the sultan of Zanzibar. The association in 1888 was given a royal charter as the Imperial British East Africa Company, but severe financial difficulties soon led to its takeover by the British government, which established the East Africa Protectorate in 1895. A railroad was built (1895–1901) from Mombasa to Kisumu on Lake Victoria in order to facilitate trade with the interior and with Uganda.
In 1903, the first settlers of European descent established themselves as large-scale farmers in the highlands by taking land from the Kikuyu, Masai, and others. At the same time, Indian merchants moved inland from the coast. In 1920, the territory was renamed and its administration changed; the interior became Kenya Colony and a coastal strip (10 mi/16 km wide) was constituted the Protectorate of Kenya. From the 1920s to the 40s, European settlers controlled the government and owned extensive farmlands; Indians maintained small trade establishments and were lower-level government employees; and Africans grew cash crops such as coffee and cotton on a small scale, were subsistence farmers, or were laborers in the towns (especially Nairobi).
In the 1920s, Africans began to protest their inferior status. Protest reached a peak between 1952 and 1956 with the so-called Mau Mau Emergency, a complex armed revolt led by the Kikuyu, which was in part a rebellion against British rule and in part an attempt to reestablish traditional land rights and ways of governance. The British declared a state of emergency and imprisoned many of the colony's nationalist leaders, including Jomo Kenyatta. After the revolt, Britain increased African representation in the colony's legislative council until, in 1961, there was an African majority.
On Dec. 12, 1963, Kenya (including both the colony and the protectorate) became independent. In 1964 the country became a republic, with Kenyatta as president. The first decade of independence was characterized by disputes among ethnic groups (especially between the Kikuyu and the Luo), by economic growth and diversification, and by the end of European predominance. Many Europeans (who numbered about 55,000 in 1962) and Asians voluntarily left the country. Boundary disputes with Somalia resulted in sporadic fighting (1963–68). In 1969, Tom Mboya, a leading government official and a possible successor to Kenyatta, was assassinated. More than 70% of the country was affected by the sub-Saharan drought of the early 1970s. Kenyatta's silencing of opponents led to further unrest domestically. Throughout the 1970s relations with neighboring countries deteriorated as well; there was a territorial dispute with Uganda, and Tanzania closed its border with Kenya when Kenya harbored several of Idi Amin's supporters after the fall of his regime.
After Kenyatta's death in 1978, Vice President Daniel arap Moi succeeded him as president. Moi promoted the Africanization of industry by placing limits on foreign ownership and by extending credit to African investors. Domestically, he rejected demands for democratization and suppressed opposition. With economic conditions worsening, rumors of a coup led Moi to dismantle the air force and order the imprisonment of those suspected of involvement. Throughout the 1980s, Moi consolidated power in the presidency and continued to conduct periodic purges of his administration.
Rioting erupted in 1988 after several outspoken proponents of a multiparty democracy were arrested. Bowing to pressure at home and abroad, in 1991 the legislature passed a constitutional amendment legalizing multiparty democracy. In 1992, Moi was reelected president in Kenya's first multiparty election in 26 years. Opponents denounced the election as fraudulent, and the government was subsequently accused of human-rights violations. The 1990s saw tens of thousands of refugees flee fighting in Somalia to NE Kenya. Moi was reelected in 1997, but the governing party lost several seats in parliament. In Aug., 1998, a terrorist bomb exploded at the U.S. Embassy in Nairobi, killing some 250 people.
Forced under the constitution to retire, Moi engineered the nomination of Uhuru Kenyatta, son of Kenya's first leader, as the Kenya African National Union (KANU) candidate for president in 2002. Mwai Kibaki, who had run against Moi in 1992 and 1997 and once was his vice president, was the National Rainbow Coalition (NARC) candidate and the most prominent of the four opposition candidates. The December election, although not free of vote rigging, was the most credible multiparty election since independence and resulted in a significant opposition victory. Kibaki was elected president with 62% of the vote, and NARC won a majority of seats in the national assembly.
A constitutional conference was convened to revise the constitution, but when it approved (Jan., 2004) reducing the president's powers and establishing an executive prime minister, the government withdrew from the conference. Kibaki, who had supported such a proposal while in the opposition and had called for a new constitution to be in place 100 days after his election, saw his coalition divide over the issue. In July he let the conference's mandate expire and appointed a new committee to continue the work. Also in July he expanded his cabinet, bringing representatives of KANU and another opposition party into the government and demoting coalition members who had supported reducing the president's powers. By the end of 2004 a three-way division had developed in the NARC coalition, and a factional split in KANU resulted (Feb., 2005) in two separate executive councils claiming control of the party. The KANU factions continued to fight for control of the party through 2006.
In Aug., 2004, some Masai begin to mount protests over land on which they said the lease, signed 99 years ago with the British, had expired. The government challenged that assertion, but the Masai actions brought to the fore the inequity of many long-term leases (some more than 900 years long) that the British forced on the indigenous peoples of Kenya. The issue of the very-long-term leases was one that the stalled constitution might have resolved. Early 2005 saw outbreaks of fighting between Masai herders and Kikuyu farmers over scarce water resources.
The issue of corruption, which Kibaki had promised to attack but left to fester, roiled the government in 2004 and 2005 when the British ambassador accused Kenyan officials of "massive looting." The president's chief anticorruption adviser resigned out of frustration in Feb., 2005, and the Law Society accused the current vice president, attorney general, and finance minister of graft. In March the government said that it had identified in British bank accounts about $1 billion stolen from government project under the Moi administration and was making efforts to recover the money.
Parliament approved a draft constitution in July, 2005, that included the office of prime minister, but most executive powers remained with the presidency. Some members of the cabinet called for its defeat in the required referendum, as did former president Moi, while Kibaki called for its approval. Voters solidly rejected the document in Nov., 2005, in a blow to Kibaki's presidency. Kibaki subsequently dismissed the entire cabinet and suspended the opening of parliament; in December he appointed a new cabinet dominated by allies, but some ministers and deputies he nominated rejected the posts. Drought and crop failures in NE Kenya in 2005 led to food shortages and deaths due to starvation late in the year; the government was accused by some of responding slowly to the problem.
By Feb., 2006, two corruption scandals had resulted in the resignation or removal of four cabinet members, including the finance minister, and accusations of corruption had also been leveled at the vice president, who denied the charges. In March elite Kenyan police raided Kenya's oldest newspaper and its television station; copies of the newspaper were burned by police during the raid and the station was forced off the air. The government raid, which appeared to be an attempt to intimidate a critical media outlet, was denounced by opposition figures and by many cabinet members. The same month Kibaki finally reopened parliament. Kenyan and Ethiopian soldiers clashed in Apr., 2006, when the Ethiopians crossed the Kenyan border in pursuit of Oromo rebels. The fighting in Somalia in 2006 drove some 30,000 refugees into NE Kenya by mid-2006, adding to the 130,000 who had arrived since 1991, and in subsequent years the number of Somali refugees rose to more than 350,000. A cabinet reshuffle in Nov., 2006, largely undid the earlier ministerial resignations brought about by corruption scandals; only the former finance minister remained without a cabinet post.
President Kibaki, running as the Party of National Unity candidate, was declared the winner of the Dec., 2007, presidential election, but domestic and foreign observers questioned that result. (In Apr., 2008, a report by European Union investigators said that it was impossible to determine who may have won the election.) His main opponent, Orange Democratic Movement (ODM) candidate Raila Odinga, accused him of vote fraud; Odinga had led in the opinion polls preceding the vote. The ODM won a plurality in the legislature, and many members of Kibaki's cabinet lost their legislative seats. The presidential result led to rioting and violence in many parts of Kenya. Some of the violence was ethnically based, with Luos (Odinga's tribe) attacking Kikiyus (Kibaki's tribe). More than a thousand Kenyans died and several hundred thousand were displaced as a result of the violence.
After negotiations mediated by Kofi Annan, the former UN secretary-general, both sides agreed in Feb., 2008, to form a power-sharing government, with Odinga as prime minister. After additional negotiations and, in early April, protests by Odinga's supporters, a cabinet was agreed on, and Odinga and the cabinet were sworn in in mid-April. The coalition government, however, proved cumbersome, beset by corruption, by continual partisanship and bickering over powers and responsibilities, and by an inability to enact agreed-upon reforms. A commission of inquiry into the elections reported in Oct., 2008, that in some areas politicians and business owners had participated in the planning and organization of the post-election clashes. It called for a tribunal to try those who had instigated the violence, but parliament subsequently failed to pass legislation establishing the tribunal.
In July, 2009, Kenya reached a deal with the International Criminal Court under which Kenya agreed to establish a tribunal by July, 2010, but after Kenya failed to meet a Sept., 2009, planning deadline, the ICC's chief prosecutor announced the court would prosecute those most responsible for the violence. In Apr., 2010, the parliament finally approved a draft constitution; the document, which increased checks on presidential power and devolved some powers to local governments, was approved in a referendum in August; effective after the 2013 elections, the position of prime minister was abolished. In Dec., 2010, the ICC named six prominent Kenyans, including Deputy Prime Minister Uhuru Kenyatta, that it accused of crimes against humanity; Kenya's subsequent attempts to get the UN Security Council to defer their trials failed.
In Oct., 2011, Kenyan forces invaded S Somalia and began operations against hardline Islamist forces, which Kenya held responsible for a series of attacks in Kenya. Late 2012 saw increased tensions and some violence in Mombasa and coastal Kenya involving, separately, secessionists who wish to see the coast independent of Kenya and hardline Islamists. The Mar., 2013, presidential election was primarily a contest between Odinga and Kenyatta; the latter secured more than 50% of the vote by the thinnest of margins, avoiding a runoff. Odinga challenged the result in court, but the vote was upheld; the final tally had been delayed by failures in the vote counting system, and the national count lacked transparency, according to observers. The coalition supporting Kenyatta won pluralities in the Senate and National Assembly. In September, Vice President William Ruto went on trial at the ICC on charges of crimes against humanity. Later in the month Islamists mounted an armed terror attack against a Nairobi shopping center that left more than 60 people dead. Although Somalia's Al-Shabab claimed responsibility for the attack, eyewitness reports suggested that some of the attackers may have been Kenyan.