Archaeological excavations in northern Kenya suggest that the region was home to ape-like creatures from whom Homo sapiens descended at least six million years ago.
Over the past few millennia, Kenya has been settled by a large number of migrants from all over Africa, among the most recent arrivals being the Maasai, who crossed from present-day South Sudan in the 17th century.
The mediaeval Kenyan coast was a prosperous maritime trade centre serving ships from Arabia and Asia. Many modern ports, including Lamu and Mombasa, date from this era. The Portuguese arrived on the coast in the early 16th century, followed by Omani Arabs in the 18th century, and the British in the mid-19th century.
It was only in the 1890s that outsiders penetrated far into the interior, resulting in the British construction of the 'lunatic line' from Mombasa to Kampala (Uganda). Nairobi, founded as a staging point along this railway line, became the headquarters of the British colonial administration.
In the early 20th century, the fertile highlands around Nairobi attracted an influx of European settlers. This resulted in a liberation movement demanding greater territorial, economic and political rights for locals. Led by Jomo Kenyatta, the fight for independence gathered pace after World War II, culminating in the 1950s with a bloody three-year guerrilla war between the Mau Mau and the British colonial authorities.
Kenya was granted independence in 1963, and the Kenyan African National Union (KANU), led by Kenyatta, took power. Kenyatta died in 1978, and was succeeded by Daniel Arap Moi, an autocrat who banned opposition parties outright in 1982. A multi-party system was restored in the early 1990s, but Moi remained in power until the 2002 election, which was won by the National Alliance Rainbow Coalition (NARC), led by Mwai Kibaki, who became the country's third president.
Disputed 2007 elections resulted in widespread violence in which hundreds were killed. Following this violence, international mediators negotiated an agreement retaining Kibaki as president, but installing his main rival Raila Odinga as prime minister. The more peaceful 2013 elections saw Uhuru Kenyatta (son of Jomo), leader of the National Alliance party, elected president.
Did you know?
• In 2004 Wangari Mutu Maathai became the first African woman to receive the Nobel Peace Prize, awarded to her for her contribution towards sustainable development, peace and democracy. She died in 2011.
• The world’s 20 fastest marathon runners in 2011 were all from Kenya.
• Some 2,500 railway workers were killed, many by lions, while building the Lunatic Line in the late 1800s.