RABAT (AFP) -- Pope Francis joined Morocco's King Mohammed VI on Saturday in declaring Jerusalem the "common patrimony" of Christians, Jews and Muslims, on the first day of a visit to the North African country.
The spiritual leader of the world's 1.3 billion Catholics was invited by King Mohammed VI for the sake of "interreligious dialogue", according to Moroccan authorities.
In a joint statement, the two leaders said Jerusalem was "common patrimony of humanity and especially the followers of the three monotheistic religions," during the pontiff's visit to Rabat.
"The specific multi-religious character, the spiritual dimension and the particular cultural identity of Jerusalem... must be protected and promoted," they said in the declaration released by the Vatican.
Their statement came after US President Donald Trump's landmark recognition of the disputed city as capital of Israel, sparking anger across the Muslim world, especially from Palestinians who see Jerusalem as the capital of their future state.
Improving relations with other religions has been a priority for the Argentine pontiff, whose papacy has been marred by a wave of child sex abuse allegations against clergy.
Addressing thousands of Moroccans who had braved the rain to attend the welcome ceremony, Francis said it was "essential to oppose fanaticism".
He stressed the need for "appropriate preparation of future religious guides", ahead of meeting trainee imams later on Saturday.
Catholics are a tiny minority in the country where 99 percent of the population is Muslim.
The king is revered across West Africa as "commander of the faithful".
Speaking at the ceremony at the Tour (or tower) Hassan mosque and nearby mausoleum in Rabat, Francis defended "freedom of conscience" and "religious freedom".
"Live as brothers," he told a crowd of around 25,000, after arriving from the airport in his Popemobile, passing rows of Moroccan and Vatican City flags.
An estimated 12,000 well-wishers packed the esplanade outside the partly-finished 12th century mosque, some in traditional dress, according to Moroccan officials.
Some 130,000 people across Rabat watched the first stage of the pope's visit, which was beamed onto giant screens, officials said.
Francis will also visit an institute where around 1,300 students are studying to become imams and preachers, teaching "moderate Islam" and backed by the king.
"It's a very significant event, the first time that a pope is welcomed to an institute for the training of imams," said Vatican spokesman Alessandro Gisotti.
Rabat has stepped up security ahead of the first papal visit to the North African country since John Paul II in 1985.
Buildings have been repainted, streets decorated and lawns manicured for the pope's two-day visit.
Last month Francis visited the United Arab Emirates, where he met with Sheikh Ahmed al-Tayeb, the imam of Cairo's Al-Azhar, Sunni Islam's prestigious seat of learning.
The two signed a document which called for "freedom of belief" and "full citizenship" rights for minorities, a text which Gisotti said the pontiff will give to heads of state.
In Morocco, where Islam is the state religion, authorities are keen to stress the country's "religious tolerance" which allows Christians and Jews to worship freely.
But Moroccans are automatically considered Muslim if they are not born into the Jewish community, apostasy is socially frowned upon, and proselytising is a criminal offence.
Those who try to "rock the faith of a Muslim or to convert him to another religion" risk a prison term of up to three years.
After years in the shadows, since 2017 the small number of converts have called openly for the right to live "without persecution" and "without discrimination".
Around 30,000 to 35,000 Catholics live in Morocco, many of them from sub-Saharan Africa.
The pope is due to finish his Saturday schedule by meeting migrants at a centre run by Catholic humanitarian organisation Caritas.
The charity runs day centres for migrants who are trying to reach Europe across the Mediterranean, as well as helping them access services.
The number of people taking the sea route from Morocco to Spain has recently surged as it has become harder for them to pass through Libya.
In 2017, Caritas centres in Rabat, Casablanca and Tangiers welcomed 7,551 new arrivals, according to the charity.
Rabat claims to have a "humanistic" approach to migration and rejects allegations by rights groups of "brutal arrest campaigns" and "forced displacement" to the country's southern border.
Francis has throughout his papacy highlighted the plight of migrants and refugees, calling on Catholics as well as politicians to show solidarity with those in need.
On Sunday, the pope will celebrate mass at a Rabat stadium with an estimated 10,000 people attending.