Pope Francis concludes his five-day trip to Mexico on Wednesday with a visit in a Ciudad Juarez prison and a stop at the Texas border when immigration is a hot issue for the US presidential campaign.
He also set a meeting with workers and advocacy groups at which he was expected to address poverty and income inequality.
During his visit Pope Francis focused heavily on the injustices faced by Mexico's poorest, most oppressed and vulnerable to the country's drug-fueled violence.
He sought to offer comfort, as he chastised Mexico's political and religious leaders for failing to do good for their people.
The pope makes a point of going to prisons on nearly every one of his foreign trips.
He has denounced abuse of pre-trial detention, called life sentences a "hidden death penalty" and urged a worldwide end to capital punishment.
But he also tells inmates not to let their suffering lead to violence, a message he may repeat given the riot last week at Monterrey's Topo Chico prison, in which 49 inmates were killed.
Ciudad Juarez's Prison No. 3, where Francis planned to speak to inmates and visiting family members, is relatively calm these days, but not long ago it was considered the murder capital of the world, as cartel-backed gang warfare fed homicide rates that hit 230 per 100,000 residents in 2010.
"At least now we can go out. We go to the parks. We can walk around a little more at that time of night," Lorena Diaz said, standing under a huge banner of Francis hanging from her second-floor balcony.
Francis also planned to visit the border with El Paso, Texas, where he was expected to stop at the fence, give a blessing in honour of migrants on the other side and pray for those who died trying to get there.
His visit comes at a time when border apprehensions of families and unaccompanied minors rose significantly in the last three months of 2015.
Republican presidential candidates Donald Trump and Senator Ted Cruz have pledged to expel all the estimated 11 million immigrants who have came to US illegally and build a wall along the entire border from Texas to California.
On the eve of Francis' trip, Trump criticised the pope's border stop.
"I don't think he understands the danger of the open border that we have with Mexico," Trump said in an interview with Fox.
"I think Mexico got him to do it because they want to keep the border just the way it is. They're making a fortune, and we're losing."