The pope had promised to travel to South Sudan, when he hosted rival leaders Salva Kiir and Riek Machar at a Vatican retreat but four years since that meeting violence remains a problem in the country.
Pope Francis has appealed to the people of South Sudan to lay down their "weapons of hatred" at an open-air mass on the final day of his pilgrimage to a country blighted by violence and poverty.
Large crowds of ecstatic worshippers streamed into the John Garang Mausoleum in the capital Juba on Sunday to see the 86-year-old pontiff, who has made peace and reconciliation the theme of his three-day trip to the world's newest nation.
"Let us lay down the weapons of hatred and revenge... Let us overcome the dislikes and aversions that over time have become chronic and risk pitting tribes and ethnic groups against one another," he said in his homily.
People waved national flags and sang "Welcome holy father to South Sudan" as the Argentine pontiff moved through the crowds in his popemobile before delivering the mass to an audience local authorities put at around 70,000.
Francis is on the first papal visit to the largely Christian country since it achieved independence from mainly Muslim Sudan in 2011 and plunged into a civil war that killed nearly 400,000 people.
The trip — Francis's fifth to Africa — was initially scheduled for 2022 but had to be postponed because of problems with the pope's knee.
Despite a peace deal signed in 2018 between President Salva Kiir and his deputy Riek Machar, many of its conditions remain unmet and violence continues to roil the country, driving people from their homes into displacement camps.
READ MORE: Pope Francis takes peace mission to South Sudan after DRC
Hope for change
The wheelchair-bound pontiff, who himself tried to broker peace during the civil war, has received a rapturous welcome throughout his visit.
"I came to see the pope bring change to the country. For many years we've been at war, but we need peace. We want the pope to pray for us," said James Agiu, 24.
He was among the many who stayed overnight to join the mass at the John Garang mausoleum — built in honour of South Sudan's rebel hero who was killed in a helicopter crash in 2005.
"I arrived last night. I've been waiting here. All night, sitting and waiting," Agiu said, laughing. "After he goes, I sleep."
On Saturday, Francis met victims of the civil war, who were brought to Juba from various camps, and urged the government to resume the peace process and restore "dignity" to the millions affected by conflict.
With 2.2 million internally displaced people (IDPs), and another two million outside the country, South Sudan is witness to the worst refugee crisis in Africa.
The papal visit has been closely followed in the devoutly Christian country of 12 million people, where church leaders played a key role in protecting civilians during the push for independence and the 2013-18 ethnic conflict.
The pope had promised in 2019 to travel to South Sudan, when he hosted Kiir and Machar at a Vatican retreat and asked them to respect the ceasefire.
But four years later, the oil-rich country remains mired in intractable conflict, compounded by poverty, hunger and natural disasters.
In a sign of the challenges, at least 21 people were killed in a cattle raid on the eve of Francis's visit in what local authorities termed a reprisal attack in Central Equatoria state.
READ MORE: Pope: Treatment of Indigenous children in Canada was genocide