Pope Leo XIV visited a prison in Bata, Equatorial Guinea, on Wednesday on the last stretch of his four-nation Africa tour, telling inmates during the visit that they were not alone and offering a message of hope against a backdrop of criticism of the country’s prisons and judiciary.

In Spanish, Leo told the inmates gathered in a central courtyard that “You are not alone. Your families love you and are waiting for you. Many people outside these walls are praying for you,” according to remarks carried by the Associated Press. He added, “If any of you fear being abandoned by everyone, know that God will never abandon you, and that the Church will stand by your side.”

The visit echoed Pope Francis’s practice of meeting with prisoners on overseas trips, and it drew additional attention to Equatorial Guinea’s broader human-rights record and judicial system, which campaigners and outside institutions have criticized for lack of independence and for abuses including arbitrary detention. The pope’s stop came at a time when it had emerged that Equatorial Guinea was among several African nations that had received millions of dollars in controversial deals with the Trump administration connected to receiving migrants deported from the U.S. to countries other than their own, though the report said none of those migrants were being held at Bata.

In his remarks, Leo also sought to frame imprisonment as something that should not reduce people to punishment alone. He reminded authorities that justice is meant to protect society but that incarceration is not “meant to be punishment alone,” saying, “To be effective, it must always promote the dignity and potential of every person.” He further said, “True justice seeks not so much to punish as to help rebuild the lives of victims, offenders and communities wounded by evil.”

As he began speaking, a rainstorm opened, drenching the inmates, who were gathered outdoors in new uniforms of neon orange and beige. After the pope left, the drenched inmates started a dance in the courtyard and shouted “Libertad! Libertad! Libertad!”

Leo began the day earlier with Mass in Mongomo, an eastern city near the Gabon border, where government investment after Equatorial Guinea’s oil boom has been concentrated and where the presidential family is associated. The Associated Press reported that President Teodoro Obiang Nguema Mbasogo and his wife were on hand for the Mass, as was their son, Teodoro “Teddy” Nguema Obiang, the country’s vice president, who has been convicted by a French court in a case involving embezzling millions of euros and was fined and ordered to have luxury assets seized in France; the country has protested those seizures at the International Court of Justice.

The Vatican said an estimated 100,000 people attended the Mass, most standing in the entryway to the Basilica of the Immaculate Conception, the monumental church consecrated in 2011. In his homily, Leo urged citizens to work together to build a society “capable of engendering a new sense of justice,” where there is “greater room for freedom” and where “the dignity of the human person always may be safeguarded,” and he said people should “serve the common good rather than private interests, bridging the gap between the privileged and the disadvantaged.”

On the eve of the prison visit, 70 human-rights organizations published an open letter to Leo, urging him to speak out about the U.S. deportation of migrants sent to Equatorial Guinea and to encourage African nations not to be complicit, saying the practices “circumvent humanitarian protections” and expose refugees to detention, coercion, and refoulement. The report said that in the run-up to Leo’s arrival, the government released nearly 100 people arrested in a 2022 crackdown on street violence, citing a local lawyer who requested anonymity due to the country’s rights record, and that the release was described as a “positive outcome” while activists and politicians remained jailed.

At the prison, the Associated Press reported that Equatorial Guinea Justice Minister Reginaldo Biyogo Ndong denied rights abuses and said the country’s prison and justice systems respect international human-rights laws. He told journalists that the country’s justice system has an “enviable” infrastructure and is “ready to guarantee human rights, fundamental rights,” while rights groups including EG Justice urged the pope to use his moral authority to speak out, describing “individuals — prisoners of conscience, and human rights activists — in detention” whose cases raised “serious humanitarian and due process concerns.”