Pope Francis and King Mohammed VI of Morocco visit the Hassan Tower
Pope Francis and King Mohammed VI of Morocco visit the Hassan TowerReuters

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.

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.