MAPUTO, Mozambique (AP) — Pope Francis praised Mozambique's president and opposition leader Thursday for their courage in signing a landmark new peace accord, as he opened a visit to the southern African nation by calling for a future where reconciliation, hope and sustainable development become "weapons of peace."

Thousands of ululating Mozambicans, some wearing colorful skirts printed with the pope's image and the words "hope, peace, reconciliation," lined the streets of Maputo to cheer Francis' motorcade as he moved around the capital. It was evidence of the enthusiastic welcome he has received three decades after St. John Paul II helped inspire Mozambicans to end their civil war with a visit of his own.

"It's such a joy," said Danilton Nhar, a 25-year-old Mozambican who was among the few thousand young people who attended a music-filled interfaith youth event with the pope. "This is an historic date for my generation."

Mozambique's 15-year civil war, which ended with a 1992 initial peace deal, killed an estimated 1 million people and devastated the former Portuguese colony. The permanent cease-fire signed Aug. 1 was the culmination of years of negotiations to end fighting that has flared sporadically in the 27 years since.

Francis opened the day with private meeting with President Felipe Nyusi at the presidential palace. Afterward, he delivered a speech to government authorities and warmly greeted the leader of the armed opposition Renamo, Ossufo Momade, who signed the accord with Nyusi last month and was among the invited guests at the palace.

When Nyusi addressed Momade as "my brother" in his opening speech, Momade stood up from the audience and was applauded.

"Courage brings peace," Francis told them both in his opening remarks.

In his speech, Francis praised the ruling Frelimo party, the opposition Renamo and all Mozambians for their courage in setting aside personal interests and violence to work instead for the common good.

"You have experienced suffering, sorrow and affliction, but you have refused to let human relationships be governed by vengeance or repression, or to allow hatred and violence to have the final word," he said.

He urged a continued commitment to a process of reconciliation and development that respects the environment and takes care of those on the fringes of society.

"May you not desist as long as there are children and young people without schooling, families that are homeless, unemployed workers, farmers without land to cultivate," he said. "These are the foundations for a future of hope, because it will be a future of dignity. These are the weapons of peace."

Francis' visit comes just weeks before national elections on Oct. 15. The vote is considered crucial because a recent constitutional amendment has decentralized power so that provincial governors will now be elected directly, rather than appointed by the central government.

Myrta Kaulard, the United Nations resident coordinator for Mozambique, said Francis' visit would not only boost peace, but prospects for the election and future growth.

"For good elections you need peace. For development you need peace," she said on the sidelines of the papal address.

Analysts pointed to the significance of both Nyusi, a Catholic, and Momade, a Muslim, greeting the pope as a symbolically powerful message of unity amid the diversity of Mozambique, which has a long tradition of religious tolerance. Of Mozambique's 27 million people, about 7.6 million — or 28 percent — are Catholic, according to Vatican statistics. The rest belong to other Christian denominations and traditional African faiths, while about 20 percent are Muslim.

Francis sought to encourage religious tolerance as well as future reconciliation at an interfaith youth encounter later in the day that featured Muslim, Christian and Hindu young people performing dances, songs and theatrical reenactments. Speaking in his Spanish-accented Portuguese, Francis rallied the crowd to chants and seemed to enjoy their enthusiastic responses.

"Together, you are the beating heart of this people and all of you have a fundamental role to play in one great creative project: to write a new page of history, a page full of hope, peace and reconciliation," he said.

Francis' visit also comes in the aftermath of the devastating back-to-back cyclones that ripped into Mozambique earlier this year, killing more than 650 people and destroying vast swaths of farmland.

"Sadly, I will not be able to go personally to visit you, but I want you to know I share in your anguish and suffering, and the commitment of the Catholic community to respond to this most difficult situation," he said.

Later Thursday, Francis was meeting with Mozambique's priests and religious sisters at the capital's art deco Immaculate Conception cathedral to offer them encouragement in the face of the constant challenges of suffering, poverty and religious indifference.

Among those welcoming Francis when he arrived Wednesday was Sister Deolinda Pires, a Mozambican nun.

"He is coming to bring us hope, encouragement, reinvigorating our faith," she said. "It's a very important moment because we believe he is bringing a strong message of hope."

On Friday, Francis visits a hospital where HIV patients are being cared for by a Catholic charity and celebrates a final Mass before heading to Madagascar on the second leg of his trip.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.