Pope Francis has urged Kenyans to unite and take a stand against the destructive effects of tribalism.
During a speech to young people in the Kenyan capital, Nairobi, he got the audience to hold hands to symbolise that they stood together as one nation.
Kenya was shaken by inter-ethnic violence after elections in 2007 in which 1,200 people died.
The pontiff also made an impassioned plea against corruption, saying: "Corrupt people don't live in peace."
The Pope has now landed in Uganda, and then on Sunday travels to the Central African Republic (CAR), which has been hit by serious violence between Christian and Muslim militias in recent years.
South Sudan's President Salva Kiir has made a previously unannounced visit to Uganda, especially to meet Pope Francis.
The Pope is interested in discussing the situation in South Sudan and its relations with its neighbour Sudan, the BBC understands.
South Sudan, the world's youngest state, is in the midst of a civil conflict which began almost two years ago, and leaving tens of thousands dead and displacing more than two million people from their homes.
'CORRUPTION IS LIKE SUGAR'
The BBC's Ruth Nesoba at Nairobi's Kasarani stadium, where the Pope spoke about issues affecting young people, says the crowd cheered wildly when he condemned corruption.
He urged them not to accept bribes likening the temptation to an unhealthy desire for sugar.
"Each time… we put it in our pockets, we destroy our hearts - we destroy our personalities and we destroy our country. Please don't develop that taste for that sugar that is corruption."
Overcoming tribalism would be a daily endeavour that would require Kenyans to listen one another to avoid division, he said.
"I want to invite you all - that we hold each other's hands - let's hold hands together, let's stand up as a sign against bad tribalism - we are all a nation."
Pope Francis also addressed radicalisation in a country which has suffered several serious attacks by Islamists from the Somalia-based al-Shabab group.
"If a young woman or man has no work, cannot study, what can he or she do? The first thing we have to do to stop a young person to be recruited is education and work."
Earlier, the pontiff was cheered as he arrived at his first stop of the day in Kangemi, which is home to tens of thousands of people living in cramped rooms, usually without running water and basic sanitation.
He criticised private developers for grabbing land from poor people, referring to an incident earlier this year when police fired tear gas at children protesting against developers trying to take over their playground.
In January children from a council-run school in Nairobi demonstrated against the apparent sale of their playground. The authorities later apologised after police tear gassed the children. A minister confirmed that the play area belonged to the school not a private developer. He was also critical of wealthy minorities indifferent to the plight of the poor and called for improved living conditions and infrastructure in urban areas - including drinking water and schools. It was a duty for all to ensure that the poor in urban areas had the "three Ls" - access to land, lodging and labour, he said.