ROME — Pope Francis is forging ahead with promoting moderate Islam during a weekend trip to Morocco, seeking to build on warming ties with the Sunni world while also ministering to a tiny Catholic community and offering solidarity with migrants.

For the 82-year-old pope, the 27-hour, whirlwind visit to Rabat, the Moroccan capital, will be a welcome reboot to a year that has otherwise been dominated by the global Catholic clergy sex abuse scandal and the downfall of three of his cardinals.

The trip comes after Francis’s February visit to the United Arab Emirates, where the pope and the imam of Cairo’s Al Azhar, the seat of Sunni learning, signed a landmark joint statement establishing the relationship between Catholics and Muslims as brothers, with a common mission to promote peace.

The document, which Francis has been giving to visiting heads of state and which has been welcomed by Muslim intellectuals in Europe and the Mideast, is likely to feature in some of Francis’s remarks.

The highlight of the Morocco trip will be Francis’s visit Saturday to the Mohammed VI Institute, a school of learning for imams that epitomizes Morocco’s efforts to promote a moderate brand of Islam and export it via preachers to Africa, the Middle East and Europe.

Morocco, a Sunni Muslim kingdom of 36 million, reformed its religious policies and education to limit the spread of fundamentalism in 2004, following terrorist bombings in Casablanca in 2003 that killed 43 people.

The Mohammed VI Institute, named for the king, trains Moroccan imams, as well as those from sub-Saharan Africa, Tunisia, Libya and Europe.

“Morocco has taken it upon itself to become a patron of moderate Islam in both Africa and Europe,” said Abdellah Boussouf, secretary-general of the Council of the Moroccan Community Living Abroad.

The aim, he said, is to prevent Muslims in Europe and Africa from becoming victims of terrorism to “change the negative image Islam has” in Europe.

Francis had planned to deliver a greeting at the institute, which is located in the Madinat al’Irfane University campus district of Rabat. But a revised plan calls instead for two students and Morocco’s minister for religious affairs to take the floor, while the pope and king listen, Vatican spokesman Alessandro Gisotti said.

Youssef Aknoui, a graduate of the institute and a preacher at Rabat’s Ahli Fes Mosque, told The Associated Press the school stresses academics as well as the Moroccan tradition of Islam.

“The institute oriented us toward a more balanced, rationalized understanding of Islam,” he said. “We were trained in history and communication, all means to combat religious fundamentalism in our work now.”

That repudiation of religious fundamentalism runs throughout the “Human Fraternity” document Francis signed in Abu Dhabi with Sheikh Ahmed el-Tayeb, the grand imam of Al Azhar.

The document outlines a shared set of values and principles common to Christians and Muslims, focusing on the dignity of every person and a rejection of violence committed in God’s name.

“It has surprised us all, because this understanding of being part of a single human family means that Muslims and Catholics, from this document onwards, recognize and accept one another as brothers,” said Paola Pizzo, professor of contemporary history of Islamic countries at the University of Chieti-Pescara.

The document also calls for changes to laws that “prevent women from fully enjoying their rights.” Pizzo, who heads the Christian-Muslim relations department at Rome’s Sant’Egidio Community, said that requires “a maximum commitment in the Sunni world to promote the dignity of women.”

Some Catholic conservatives, meanwhile, have criticized the document’s statement that “God willed” a plurality of religions. For these critics of Francis, the claim relativizes the centrality of the Catholic faith in human salvation.

Francis will also visit a migrant center run by the Catholic Church’s Caritas charity organization in Morocco and attend a Mass on Sunday with Morocco’s largely expat Catholic community, which numbers about 23,000.

Morocco last year became the main departure point for sub-Saharan African migrants seeking to reach Europe via Spain, after Italy essentially closed its borders to migrants leaving from Libya.

The rising numbers of migrants have put pressures on the kingdom, and become a hot political issue in Spain ahead of that country’s April 28 general election.

El Masiati reported from Rabat, Morocco.