Pope Francis has taken aim at land grabs by Kenya's elite, acts that have been identified as a major source of conflict and ethnic tension in the country.

In a speech on poverty at a church in the Kangemi slum of Nairobi, Francis criticised "private developers" whom he accused of hoarding land and even attempting to take playgrounds away from schools.

It is thought he was referring to an incident in January when primary school kids at the Langata Road Primary School were tear-gassed by police during a demonstration against the take-over of their playground.

The students were in the front lines of demonstrators pulling down a wall around the playground that had been erected by a private developer.

After an international outcry, the Kenyan government declared the playground the property of the school.

The Pope also denounced the conditions slum-dwellers are forced to live in, saying access to safe water is a basic human right and that everyone should have dignified, adequate housing.

He insisted that everyone should have access to a basic sewage system, garbage collection, electricity as well as schools, hospitals and sport facilities.

Francis told the residents that people forced to live in slums actually share values that wealthier neighborhoods can learn from: solidarity and looking out for the poor.

However, he added that it is unjust that entire families are forced to live in unfit housing, often at exorbitant prices.

He called for a "respectful urban integration" with concrete initiatives to provide good quality housing for all.

The Pope later left Kenya and is now bound for Uganda, the second leg of his tour of three nations on his first visit of Africa.

At the Jomo Kenyatta International airport in Nairobi, he was welcomed by traditional dancers, some in Maasai dresses, children waving the Vatican flag, and choirs.

Hundreds of people lined the roads leading to the airport to wave him goodbye.