LAS GARZAS, Panama — More than 100,000 young people are expected to show up in Panama City when Pope Francis visits this week for World Youth Day. At a detention center about 25 miles away there are 144 more who can’t make the trip, locked up for serious crimes including murder — so the pontiff is going to them.

In an encounter expected to last a little over an hour, Francis will pray and bring a message of peace and reconciliation to the young inmates, and hear the confessions of several, including one convicted of committing a double homicide at just 16 years old.

“The pope is going to listen to them, encourage them,” Panama Archbishop Jose Domingo Ulloa said. “They have been preparing with high hopes to be able to receive his message.”

Francis nearly always makes side visits to prisons during his foreign trips, in keeping with his belief that even those on the lowest rungs of society have dignity and need ministry.

In such visits he typically preaches hope and reminds inmates that he has also sinned, and criticizes judicial failings such as prison overcrowding and inadequate rehabilitation efforts. This will be the first time he hears confessions in a prison, however.

The Las Garzas de Pacora detention center is Panama’s main youth lockup, opened a year after five minors died in a fire at another prison in Panama City in 2011. Nine people including administrators and police were convicted of homicide or negligence in what was the worst tragedy for the country’s youth prison system.

Today, administrators argue that Las Garzas de Pacora is a model facility compared with other youth prisons in the region that suffer from overcrowding.

Designed to house up to 200, it’s well within capacity. Inmates have painted the cellblocks in pastel colors, its green grass is well tended, and it has a school, a laundry, a dining hall and workshops where the youths can learn trades such as masonry, carpentry and screen printing.

It’s a rough population — about 65 percent of the inmates were sent there for robbery and the rest for homicide, authorities say. But members of rival gangs are said to coexist without conflict.

Internees have painted symbols of peace and the logo of the youth festival on walls and chairs in preparation for Francis’ visit.

On a recent day a group rehearsed the World Youth Day hymn at the entrance to the school. One boy played the piano, others strummed guitars and still others formed the chorus, coached by volunteers ahead of a planned performance for the pontiff.

Emma Alba de Tejada, national director of interdisciplinary studies in youth prisons, acknowledged that some of the young inmates aren’t interested in participating in the pope’s visit. But others are excited, she said.

“Just thinking that the pope is coming to visit has for them been a total transformation,” she said. “They are dressing up the facility. They have painted it, they have gotten involved, they are singing.”

One boy, who was left disabled after being shot in the leg, was working on an acrylic painting of Panamanian folkloric images, one of several gifts planned for Francis along with a footrest and a staff. He said he first learned about the pope’s visit from television and was looking forward to meeting him.

“For me it will be important to have an encounter, to receive the blessing,” said the inmate, who was convicted of murder and cannot be identified due to Panamanian law governing child protection. “I would tell him to give me another chance.”