In his last day in Mexico, Pope Francis visited the Cefereso No. 3 prison in Ciudad Juárez, Chihuahua.
“I did not want to leave Mexico without celebrating the Jubilee of Mercy with you,” the Pope said to the inmates.
“We have forgotten to focus on what should be our real concern: your lives,” Pope Francis said. He added that jails are just a symptom of the status of society, of the omissions that have led to a “discard culture.”
Pope Francis said that the process of reinsertion into society starts with having all children in school and enough jobs for all families.
The pontiff also urged the inmates to help end the cycle of violence and crime and to forgive the society that failed to help them.
Pope Francis urged prisoners to look to the future and believe that their lives can change rather than dwell on the "sorrow and sin" that got them incarcerated.
Francis told the 700 or so inmates gathered in the prison chapel that they cannot undo the past. But he said they must believe that things can change, and that they have the possibility of "writing a new story and moving forward."
He said: "You have known the power of sorrow and sin and have not forgotten that within your reach is the power of the resurrection, the power of divine mercy which makes all things new."
Pope Francis is expected to meet with Mexican workers, grassroots groups and employers later in the day.
The altar for Wednesday's open Mass is snug against the U.S.-Mexico border, with just a highway between its edge and the Rio Grande.
Clearly visible is the skyline of El Paso, Texas, where at least 30,000 people were expected at the Sun Bowl for a simulcast of the ceremony.
Francis was expected to stop at the border fence and give a blessing in honor of migrants on the other side, as well as those who died trying to get there.
Migration is a theme close to the pontiff's heart. He has demanded that countries welcome those fleeing poverty and oppression and denounced what he calls the "globalization of indifference" toward migrants.
It's a message that hasn't gone down well with some in the U.S., at a time when border apprehensions of families and unaccompanied minors rose significantly in the last three months of 2015.
Republican presidential hopefuls Donald Trump and Sen. Ted Cruz have vowed to expel all the estimated 11 million immigrants in the U.S. illegally and build a wall along the entire border from Texas to California.
On the eve of Francis' trip, Trump criticized 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."
Late Tuesday, the Vatican spokesman, the Rev. Federico Lombardi, said the pope is concerned about the plight of migrants everywhere, not just in the United States.
"The pope always talks about migration problems all around the world, of the duties we have to solve these problems in a humane manner, of hosting those who come from other countries in search of a life of dignity and peace," Lombardi said.
The pope makes a point of going to prisons on nearly every foreign trip, part of his longtime ministry to inmates and his belief that the lowest in society deserve dignity.
Ciudad Juarez's Prison No. 3, where Francis spoke to inmates and visiting family members, is relatively calm these days. But it has seen violent clashes before that reflected the chaos outside its walls.
Not long ago Juárez 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. A rash of killings of women, many of them poor factory workers who just disappeared, attracted international attention.
Last year, the city's homicide rate was about 20 per 100,000 people, roughly on par with Mexico's nationwide average of 14 per 100,000 - and well below what is being seen in current hotspots of drug violence such as the Pacific resort city Acapulco and surrounding Guerrero state.
(With information from AP)