NAIROBI — Former president Barack Obama Monday praised Kenya’s president and opposition leader for working together but said the East African country must do more to end corruption.

Obama, on his first visit to Africa since stepping down as president, commended President Uhuru Kenyatta and opposition leader Raila Odinga for cooperating after last year’s disputed presidential election.

‘‘Despite some of the tumultuous times that seem to attend every election, we now have a president and major opposition leader who have pledged to build bridges and have made specific commitments to work together,’’ Obama said.

‘‘So what we see here in Kenya is all part of an emergence of a more confident, more self-reliant Africa. But we know real progress means addressing the problems that remain. It means rooting out corruption that weakens civic life,’’ he said.


Other challenges facing Kenya, Obama said, are tribalism and the need for better education. Obama has passionately urged Kenya to tackle its endemic corruption and problems surrounding the divisions between this country’s ethnic groups.