By Philip Pullella and Nailia Bagirova

BAKU (Reuters) - Pope Francis visited a mosque in overwhelmingly Muslim Azerbaijan on Sunday and told leaders of all faiths that God should never be used to justify fundamentalism.

"From this highly symbolic place, a heartfelt cry rises up once again: no more violence in the name of God! May his most holy name be adored, not profaned or bartered as a commodity through forms of hatred and human opposition," he said.

"God cannot be used for personal interests and selfish ends; he cannot be used to justify any form of fundamentalism,

imperialism or colonialism," the pope said in an address to Muslims, Christians, Jews and members of other faiths at the mosque, named after Azerbaijan's late president Heydar Aliyev.

Francis has made similar appeals before and also has visited mosques on his world travels.

But his visit to Azerbaijan, whose population of about 9 million people are mostly Shi'ite Muslims, was the first time he had made such an appeal from inside the main prayer hall of a mosque in the presence of representatives of other religions.

The pontiff's first stop after he arrived in Azerbaijan's capital, Baku, on Sunday morning was a modern church where he said a Mass for the miniscule Catholic community.

The oil and gas-rich nation bordering on Russia, Iran and Turkey, has only about 700 Catholics. Many are foreigners, including staff from embassies and domestic workers and some in the oil and gas industries.

In fact, Sunday's Mass, which was said mostly in English, had more of the feeling of a worship service in a multi-ethnic, well-to-do American suburb than a liturgy on the Caspian sea.

"You are a little flock that is so precious in God's eyes," he told the congregation in the homily of the Mass in the modern church, which opened in 2007 and was built on the site of one demolished under Soviet rule in 1931.


"Courage. Go ahead without fear", said Francis, who arrived in Baku from neighboring Georgia and returns to Rome on Sunday night.

"Here the faith, after the years of persecution, has accomplished wonders. I wish to recall the many courageous Christians who trusted in the Lord and were faithful in the face of adversity," he said.

Before attending the inter-religious service in the mosque, Francis addressed President Ilham Aliyev, who succeeded his father as president in 2003.

In his own speech, Aliyev brought up Nagorno-Karabakh, a mountainous region within Azerbaijan's borders, populated mainly by ethnic Armenians who reject Azerbaijan's rule. With support from Armenia they fought a war in the early 1990s to establish de-facto control over the territory.

"Our territory remains under occupation," Aliyev told the pope.

In a reference to the many people displaced by the fighting, Francis expressed his "heartfelt closeness to those who have had to leave their land."

(Additional reporting by Margarita Andtidze in Tbilisi; Editing by Christian Lowe)