Pope Francis has that the worshippers in a mosque in the Central African Republic that “Christians and Muslims are brothers and sisters”.
The mosque visit was seen as perhaps the most difficult part of his Africa tour, a BBC correspondent says.
He was speaking to Muslims who had sought shelter in the capital Bangui after nearly three years of violence between Christians and Muslims.
Pope Francis then held the final Mass of his Africa trip in Bangui.
He was speaking in Latin, which was then translated into the local Sango language.
The Pope has now left the CAR at the end of his six-day visit to the continent.
More than 100,000 Muslims fled the capital as a result of the fighting but 15,000 are left in an area called PK5, according to the campaign group Human Rights Watch.