Kenya is an East African political and economic powerhouse, renowned for its wildlife and stunning tropical beaches.
It has become a key player on the regional stage, but its economy has been hard hit by the Covid pandemic, a punishing drought and the fallout from the war in Ukraine.
As it heads to the polls on Tuesday, here are key facts about the country:
End of Kenyatta era
Kenya became independent from Britain on December 12, 1963, scarred by the 1952-1960 Mau Mau rebellion against colonial rule that left at least 10,000 people dead.
Independence struggle icon Jomo Kenyatta was appointed Kenya's first post-colonial leader. He died in office in August 1978, succeeded by his vice president Daniel arap Moi.
In late 1991 Moi abandoned single-party rule and won presidential elections in 1992 and 1997.
Mwai Kibaki then swept into power in 2002 and went on to win re-election in 2007 against Raila Odinga, now one of the frontrunners on August 9.
Disputes over the 2007 vote count sparked the most serious political violence since independence, with more than 1,100 people killed in ethnic clashes.
Jomo Kenyatta's son Uhuru Kenyatta defeated Odinga in the 2013 elections despite being charged by the International Criminal Court (ICC) over the violence.
The court dropped its case against him in 2014 and Kenyatta was re-elected in 2017, after the Supreme Court annulled his initial victory and Odinga boycotted the rerun.
Deputy President William Ruto, Odinga's main rival next week, was also charged by the ICC but prosecutors abandoned the case in 2016.
'Cradle of Mankind'
Kenya attracted about 1.5 million visitors last year to its wildlife parks and idyllic Indian Ocean beaches.
From the Maasai Mara to Amboseli, Kenya boasts about 50 parks and reserves that are home to native wildlife including the so-called Big Five -- lions, elephants, rhinos, leopards and buffalo -- as well as giraffes, hippos and cheetahs.
The Rift Valley that stretches from Tanzania to Ethiopia via Kenya is also the site of major discoveries of fossils showing man's evolution and has been dubbed the "Cradle of Mankind".
The remains of hominids believed to be nearly six million years old have been found in Kenya.
East African hub
Kenya has a mostly Christian population of about 50 million, according to government figures, made up of more than 40 tribes, the largest being Kikuyu.
Along with Ethiopia, it is East Africa's biggest economy with gross domestic product of just over $110 billion in 2021, according to the World Bank, and remains the region's main trading hub.
Agriculture is the backbone of the economy, accounting for more than a fifth of GDP, with key exports including tea, coffee and flowers.
Kenya estimates its economy grew by 7.5 percent last year after shrinking 0.3 percent in 2020 as the pandemic threw hundreds of thousands of people out of work.
It is now grappling with a cost of living crisis, as prices of fuel and basic foodstuffs soar in a country where about a third of the population lives in poverty.
Kenya also suffers from endemic corruption. It was ranked 128th out of 180 countries on Transparency International's 2021 corruption perceptions index, with the watchdog saying its fight against graft had "stagnated".
Kenya is renowned for its athletes, especially long-distance runners, with a raft of world championship medals and records.
Among its numerous stars are marathon world record holders Eliud Kipchoge and Brigid Kosgei and Africa's fastest man over 100 metres, Ferdinand Omanyala.
Kenyan athletics is nevertheless struggling to rebuild a reputation tarnished by doping and corruption.
Kenya has suffered a string of terror attacks, the deadliest on August 7, 1998 when massive truck bombings against the US embassy in Nairobi killed 213 people and wounded 5,000. It was claimed by Al-Qaeda.
Kenya has also been targeted by the Al-Qaeda-linked Al-Shabaab since 2011 when the Kenyan military entered Somalia to fight the jihadists.
In September 2013, Islamist gunmen stormed Nairobi's Westgate mall, killing at least 67 people. In April 2015 another Al-Shabaab attack killed 148 at a university in Garissa, eastern Kenya.