The cold, dust-blown prison yard where inmates are welding a new steel bell tower for the Feb. 17 visit of Pope Francis is a microcosm of the changes that have brought hope to the once-infernal border city of Ciudad Juarez, both inside and outside the walls.

Some see the pontiff's visit as a capstone on the city's transformation from one of the most violent places on earth; others hope Francis will draw attention to the problems that remain in the bustling metropolis.

The Pope will be making an unusual visit to Prison No. 3, which used to be a center and symbol of gang power. Warring gangs once wielded total control, shooting and knifing each other, selling drugs and locking themselves inside cellblocks to which only they had the keys. They alone enforced discipline, and marked the wings of the 3,000-inmate facility with gang-related murals.

"This was the biggest drug den in Ciudad Juarez," Chihuahua state prison director Jorge Bissuet Galarza said. Other lockups weren't much better: In 2010, the worst year of violence, 216 inmates were killed in the state.

"You couldn't enter a single prison ... without asking permission from the inmates. They were the ones who controlled things," said Bissuet Galarza.

He said officials finally wrested back control, and today the prison is calm enough that Francis will be able to enter and speak to prisoners, 250 relatives and 100 religious workers — even as masked guards with shotguns patrol the yard.

Inmate Juan Salazar recalled how after he arrived in 2011 to serve a seven-year sentence for auto theft, a fight between rival gangs killed 17 inmates in one day. "It's quieter now, you feel safer," Salazar said as a he helped weld beams in the prison chapel.

Juarez as a whole is still struggling to come to terms with its thousands of dead. Most fell in the drug wars, while others — especially poor female factory workers — simply vanished, only to turn up dead long afterward.

City officials point to a reformed police force and less corruption. But many residents think the turf war between Juarez's main cartel-backed gangs ended with a deal or simply burned itself out.

"It has calmed down. The ones that had to be killed were killed," said Joel Garcia, who makes a living selling candy outside the prison and safeguarding purses, keys and other belongings that visitors can't bring inside. "The authorities want to take credit. But it was (the gangs) themselves that made a pact."

In 2010, Juarez was widely considered the murder capital of the world with a homicide rate of about 230 per 100,000 inhabitants. In the first 11 months of 2015, it was about one-tenth that level, around 21 per 100,000.

Shuttered restaurants have re-opened, and street shootouts are rare. Tourists drawn by the slumping Mexican peso have begun crossing the border again to dine and shop. Billboards with Francis's image have sprouted with slogans like "Juarez is love. We are ready."

"This is what we need: to talk about Juarez now, not the Juarez of before," said Pedro Martinez, the engineer tasked with erecting a stage about 50 yards (meters) from the border where Francis will celebrate Mass for about a quarter-million people, with thousands more expected to watch from the other side of the Rio Grande. "This is why the Pope's visit is so important."

Martinez said it has been years since he's had to execute the traffic maneuver Juarez residents know all too well — the quick U-turn, sometimes jumping a median strip, to avoid a gun battle uip the road.

The stage is going up on a dusty lot with mounds of gravel. Martinez has already cleared a path over an expressway so Francis will be able to approach the river and El Paso, Texas. On the U.S. side, backhoes are furiously cleaning mud and silt out of the river.

Juarez's proximity to the U.S. has brought jobs through hundreds of foreign-owned "maquiladora" assembly plants that ship clothes, electronics and other goods north.

But many of those pay very little, and some residents link the low wages to the broader societal ills. At a ragtag protest camp consisting of a couple of tents and an old RV outside an Eaton Industries plant, demonstrators said they earn just $45 a week with scant vacation.

"If you really want to eliminate violence, you have to provide decent-paid jobs," said Antonia Hinojosa, a mother of two.

With the worst of the bloodshed behind it, Juarez has settled back into the more common but stubborn problems that afflict other border cities — deep social inequality, and waves of migrants heading north or being deported from the United States.

Monserrat Munoz, a construction worker deported several weeks ago, said crossing the border has become increasingly dangerous. Interviewed at a shelter in Juarez, he hopes the pope delivers a pro-migrant message.

"I hope that message gets through to the governors of Texas, Arizona and New Mexico, where migrants are most being abused," Munoz said.

The Rev. Javier Calvillo Salazar, who runs the shelter, said the pope's visit promises to be a golden moment, but Juarez's root problems must still be addressed.

"All the women who were widowed, all the children who were orphaned, the young people who were traumatized, the people who ... witnessed a kidnapping or executions," the priest said. "All that can't be changed or swept from your mind or your heart in five years."