BAKU, Azerbaijan (CNS) — Cooperation, peace and prosperity come when people know how to hold fast to their cultural and religious identities without ever denigrating or trying to deny the rights and identities of others, Pope Francis said.

Twenty-five years after Azerbaijan, a predominantly Shiite Muslim nation, proclaimed its independence from the Soviet Union, the pope said strong civic institutions and lasting economic growth would come only when attention is paid to the poorest sectors of society and only as long as the nation’s multicultural identity is seen as a national treasure.

Pope Francis met with President Ilham Aliyev, government officials, representatives of civic institutions and members of the diplomatic corps in Baku Oct. 2, the final day of a three-day trip that began in Georgia.

Aliyev said that although the Soviets closed or destroyed many mosques, churches and synagogues, the nation’s people have always coexisted in peace.

The Vatican initially had framed the trip as a three-nation visit to the Caucasus region, but a sudden outbreak of violence in the contested territory of Nagorno-Karabakh in April led to a decision to do the visit in two stages. Pope Francis went to Armenia in June.

While the majority of people in Nagorno-Karabakh are ethnically Armenian, Joseph Stalin made the territory part of Azerbaijan in 1921. Since 1988, Armenia and Azerbaijan have had an undeclared war over the territory; some 30,000 people have died in the fighting and even more people have been displaced.

Aliyev told the pope the conflict must be resolved through the application of international law and he insisted Armenia is violating that law by stationing troops in the enclave.

In relations between states, the pope told the political and civic leaders, “it is necessary to persevere wisely and courageously on the path which leads to authentic progress and the freedom of peoples, opening up new avenues that lead to lasting agreements and peace. In this way, peoples will be spared grave suffering and painful wounds, which are difficult to heal.”

Pope Francis expressed his “heartfelt closeness to those who have had to leave their land and to the many people who suffer the effects of bloody conflicts,” and said he hoped the international community would find a way to help resolve the dispute.

As he did in Armenia in June, the pope urged “everyone to grasp every opportunity to reach a satisfactory solution.”

Creating a harmonious society made up of people coming from different ethnic, cultural and religious groups is an essential task today, Pope Francis said. People need to demonstrate “that it is possible to bear witness to one’s own ideas and worldview without abusing the rights of others who have different ideas and perspectives.”

Political and religious leaders, he said, “must exclude attitudes and approaches which instrumentalize their own convictions, their own identity or the name of God in order to legitimize subjugation and supremacy.”

“The world, unfortunately, is experiencing the tragedy of many conflicts fuelled by intolerance, which in turn is fomented by violent ideologies and by the effective denial of the rights of the weakest,” the pope said. The only valid path to combat such “dangerous deviations” is to foster “an untiring willingness for dialogue.”