Uhuru Kenyatta sworn in as Kenya's new president From Nima Elbagir, CNN April 9, 2013 -- Updated 1410 GMT (2210 HKT) NEW: Uhuru Kenyatta is Kenya's fourth and youngest president Rival Raila Odinga had challenged the election results in court Odinga accepted the results and offered his congratulations to Kenyatta The most recent election follows a bloody aftermath to a 2007 vote Nairobi, Kenya (CNN) -- Kenya swore in its youngest-ever president Tuesday before a massive crowd, including numerous heads of state and American civil rights activist Jesse Jackson. Uhuru Kenyatta became the country's fourth president after a prolonged election dispute that ended up in the Kenyan Supreme Court. Tens of thousands of people packed a Nairobi stadium Tuesday to watch the inauguration. Jackson, a former U.S. presidential candidate, attended the festivities as a private guest. Kenyatta, the 51-year-old son of Kenya's founding leader, won the election with 50.07% of the vote. His chief rival, Raila Odinga, won 43.31% of the vote. Odinga challenged the outcome in court, saying it was flawed and marred by technical problems. After the court upheld Kenyatta's election, Odinga offered the president-elect his congratulations. "The court has now spoken," Odinga said. I wish the president-elect and his team well. Political dynasty Kenyatta and Odinga are the sons of the nation's first president and vice president, respectively -- stirring memories of a political dynasty that dates back to the 1960s. Their fathers started out as allies in the quest for Kenyan independence from Britain. But the elder politicians' relationship ended in bad blood when founding President Jomo Kenyatta forced out his vice president, Jaramogi Odinga, following a series of disputes. A new opportunity for Kenya Despite controversy over the recent election results, the mutual acceptance by the two sons could help restore the nation's image as a bastion of stability after disputed election results in 2007 led to bloody chaos. In that election, more than 1,200 people were killed and hundreds of thousands displaced after Odinga disputed the results, which showed incumbent President Mwai Kibaki as the winner. At the time, supporters of both candidates battled in the streets with crude weapons, not in court. Complicated relations But the upholding of Kenyatta's victory raises the prospect of complicated diplomatic ties with the West. The International Criminal Court has indicted him for allegedly funding a local militia that conducted reprisal attacks in the last election in 2007. His running mate, William Ruto, also faces ICC charges at The Hague, in the Netherlands. Both have denied the charges and have said they will cooperate with the court to clear their names. Clashes kill 2 in Western Kenya after election verdict Beyond borders Kenya is East Africa's biggest economy and a crucial trade route into the rest of the continent. It provides an important buffer of stability in a region that includes the fledgling Somali government and the politically tense Sudan and South Sudan. Kenya is also a major U.S. ally in the war against Islamist militants in the region and has remained relatively peaceful amid civil wars in neighboring nations. CNN's Faith Karimi contributed to this report. Kenyan Election March 1, 2013 -- Updated 1426 GMT (2226 HKT) Kenya's most critical and complex election since independence starts Monday. It will impact the country and the way the world views Africa. March 7, 2013 -- Updated 1133 GMT (1933 HKT) Award-winning photographer Boniface Mwangi compares past images of violence to today's images of peace. March 1, 2013 -- Updated 1432 GMT (2232 HKT) Last 20 years have seen gains and reversals in transition to democracy in Africa, says John Mukum Mbaku. Explore our interactive to learn more. March 4, 2013 -- Updated 0041 GMT (0841 HKT) CNN's Nima Elbagir reports on "digital humanitarians" who are using social media to monitor Kenya's election. These trains, and their peace-promoting artwork, pass through Kenya's Kibera daily, promoting the arts and foster peaceful relationships. March 1, 2013 -- Updated 1915 GMT (0315 HKT) Long-time activist Gina Din talks to Zain Verjee about how they are promoting a peaceful election in Kenya. March 1, 2013 -- Updated 1505 GMT (2305 HKT) The 2007 post-election violence left more than 1,000 dead. Now Kenyans are coming up with innovative ways to promote peace. March 1, 2013 -- Updated 1137 GMT (1937 HKT) CNN's Zain Verjee speaks to the hosts of the popular Kenyan youth show "Teen Republik" about their hopes for the big vote. February 5, 2013 -- Updated 1154 GMT (1954 HKT) Kenya's economy faces challenge ahead of elections. CNN's Nima Elbagir reports from Kenya.