Pope Francis delivers his blessing as he arrives to hold a Mass at the campus of the University of Nairobi, Kenya (AP Photo/Ben Curtis)

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 as he kicked off his first full day in Africa with a message of tolerance and 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 attended by tens of thousands of faithful, including Kenya?s president. The Argentine pope, who has never been to Africa before, was treated to ululating Swahili singers, swaying nuns, Masai tribesmen and traditional dancers on the campus of the University of Nairobi.

Francis received a raucous welcome from the crowd as he zoomed around the grounds in his open-sided popemobile, some 10,000 police on hand for security. Some people had been there since 3 a.m., braving heavy showers, while others lined up in queues 3 kilometers (1.8 miles) deep to get close to the venue.

In his homily, Francis issued a firm appeal for traditional family values, calling for Kenyans to "resist practices which foster arrogance in men, hurt or demean women 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."

After Mass, Francis heads later to the U.N. regional headquarters in Nairobi for an important environment speech. On Friday, he arrives in Uganda for the second leg of his African pilgrimage.

Francis began his first full day in Kenya with a meeting of about 25 representatives of Kenya's faith groups: Anglicans, other Protestants, Muslims, Sikhs, Hindus and Jews.

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, but Muslims represent about 10 percent 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-Qaida-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.

His comments were echoed by Abdulghafur El-Busaidy, the head of the Supreme Council of Kenyan Muslims, an umbrella organization founded in 1973 to unify the East African nation's Islamic community.

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 of plight Palestinians the weak and the downtrodden. He epitomizes simplicity and demonstrated that he is foremost defender for social justice."

Nelly Ndunge, 29, had been out since 5 a.m. in hopes of getting a glimpse of the pope at Thursday's Mass. She 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.

(© 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed)