Pope Francis has visited a prison in the northern city of Ciudad Juarez on the last day of his five-day visit to Mexico.
He is now celebrating an open-air mass on the US border in front of hundreds of thousands of people.
The Pope is expected to use the ceremony to highlight the suffering of migrants, tens of thousands of whom cross the border every year.
Ciudad Juarez was once one of the most violent cities in Mexico.
Pope Francis visited the Cereso jail, a mixed prison in Ciudad Juarez which houses about 700 inmates, 250 of them women.
His visit was seen as a chance to give hope to the city’s residents, who lived through a spate of murders of women and rampant drug violence which meant few dared leave their homes at night.
“The problem of security is not resolved only by incarcerating; rather, it calls us to intervene by confronting the structural and cultural causes of insecurity that impact the entire social framework,” the pope told the inmates.