Pope Francis told Christian and Muslim leaders in Kenya on Thursday that they have little choice but to engage in dialogue to guard against the "barbarous" Islamic extremist attacks that have struck Kenya, saying they need to be "prophets of peace."

Francis met with a small group of Kenya's faith leaders before celebrating his first public Mass on the continent, a joyful, rain-soaked celebration of an estimated 300,000 faithful, including Kenya's president.

The Argentine Pope, who has never been to Africa before, was treated to ululating Swahili singers, swaying nuns, Maasai tribesmen and traditional dancers at the Mass on the grounds of the University of Nairobi.

On his first full day in Kenya, Francis received a raucous welcome from the crowd as he zoomed around in his open-sided popemobile, some 10,000 police providing security. Some people had been at the university since 3 a.m., braving heavy showers that turned the grounds into thick puddles of mud. Others waited in queues three kilometres long to get close to the venue.

But the size of the crowd — estimated by both police and the Vatican — was far smaller than the 1.4 million that Kenyan authorities had expected after declaring Thursday a national holiday. Vatican officials had predicted a maximum of a half-million people, and the lower number was likely due in large part to the weather.

In other speeches Thursday, the Pope:

  • Said said illegal trade in diamonds and other precious stones and metals, as well as the poaching of elephants for their ivory tusks "fuels political instability, organized crime and terrorism."
  • Warned it would be "catastrophic" if special interests get in the way of a global agreement to curb the fossil fuel emissions blamed for global warming at a meeting next week in Paris over climate change.

  • Urged Kenyan priests and nuns to serve others and not be served. He told seminarians if they're not up to the task to go find a new job and start a family. In a feisty mood, he ditched his prepared speech and spoke off-the-cuff.

In his homily, Francis appealed for traditional family values, calling for Kenyans to "resist practices which foster arrogance in men, hurt or demean women, don't care for the elderly and threaten the life of the innocent unborn."

The African church is among the most conservative in the world, and African bishops have been at the forefront in insisting that traditional church teachings on marriage and sexuality, and its opposition to abortion, be strongly emphasized.

Francis obliged, but also stressed issues of his own concern: He called for Kenyans to shape a more just society that looks out for the poor and to "reject everything that leads to prejudice and discrimination, for these things are not of God."

Kenya Pope Francis Africa

Kenyan Army guards overlook people standing next to a banner showing Pope Francis as he holds a Mass at the campus of the University of Nairobi in Kenya Thursday. (Ben Curtis/Associated Press)

Francis heads later to the UN regional headquarters in Nairobi for an environment speech. On Friday, he arrives in Uganda for the second leg of his trip.

Earlier Thursday, Francis met with about 25 representatives of Kenya's faith groups: Anglicans, other Protestants, Muslims, Sikhs, Hindus and Jews.

Dialogue 'essential'

The Pope insisted that religion can never be used to justify violence and lamented that "all too often, young people are being radicalized in the name of religion to sow discord and fear, and to tear at the very fabric of our societies."

He said dialogue among the faiths isn't a luxury or optional, but is simply "essential."

Kenya, a former British colony, is majority Christian. Muslims represent about 10 per cent of the population.

In the meeting, Francis referred explicitly to three recent attacks claimed by the Somalia-based al-Shabab extremist group, saying he knew well that the memories were still fresh in Kenya's mind.

In April, the al-Qaeda-linked al-Shabab claimed responsibility for the attack on a mostly Christian college in northeastern Kenya that left some 150 people dead. A month earlier, al-Shabab claimed responsibility for attacks in Mandera county on the Somali border in which 12 people died. In September 2013, at least 67 people were killed in an attack by al-Shabab on the Westgate mall in Nairobi.

Al-Shabab opposes Kenya's decision to send troops to Somalia to fight the group as part of an African Union force backing Somalia's weak federal government.

"How important it is that we be seen as prophets of peace, peacemakers who invite others to live in peace, harmony and mutual respect," Francis said.

'I am a Catholic and I believe he is godsend.' - Nelly Ndunge

His comments were echoed by Abdulghafur El-Busaidy, the head of the Supreme Council of Kenyan Muslims.

He said Christians and Muslims must work together to accommodate one another, and lead the country. "We should not step back," he said. "We have to lead, because we are led by the word of God."

Francis' message of tolerance and his concern for the poor has been welcomed by Kenyans of all religious stripes.

"This Pope has transcended religious fault lines," said Kenyan Sen. Hassan Omar, a Muslim. "He has talked about the plight of Palestinians, the weak and the downtrodden. He epitomizes simplicity and demonstrated that he is foremost a defender for social justice."

Nelly Ndunge, 29, said Francis' visit to Kenya was a blessing because it would renew her faith — and had boosted her printing business: She said she had already sold nearly 3,000 copies of a 2016 calendar with the Pope's portrait on it.

"I am a Catholic and I believe he is godsend," she said as she waited to see him at the Mass.

Others shared the sentiment but left the university early because they felt the day was marred by disorganization.

Sarah Ondiso, a senior government official, said security and volunteers arrived at the site only well after the faithful had lined up, and then didn't know where to direct them.