For 34 years, home for Daniel Peters has been a prison cell. He has been locked up since age 17, with the promise of life in prison. But on June 24, he was released to a halfway house in Philadelphia's Callowhill neighborhood.

It was terrifying, but at least he knew just what to expect. He had been given a tour of the facility - using virtual reality goggles.

Peters - the first to be released of 295 inmates from Philadelphia sentenced as juveniles to life without parole under a law the Supreme Court has since found unconstitutional - is a test case in an unprecedented reentry challenge for the city.

So, officials and nonprofit groups are piloting unprecedented measures as they wrestle with how to support reintegration - releasing inmates from prison in their 50s, 60s or 70s, with no savings, varying amounts of family support, and no experience navigating the world as adults.

"We're trying to figure out the best path that we can put someone who was a child when they came to us," Pennsylvania Corrections Secretary John Wetzel said. "We're trying to figure out what reentry looks like if we want them to be successful."

The needs are significant. Of 507 lifers statewide, 95 are on the prisons' active mental-health roster; half have a history of mental-health problems. There are 21 sex offenders among them.

And 318 have been locked up longer than 20 years. The oldest, Joseph Ligon, is 78 and has been incarcerated since 1956, giving him the miserable distinction of being the world's longest-serving juvenile lifer. Like all other juvenile lifers, he has not had the chance to amass retirement savings, pay into Social Security, or earn a pension.

All the inmates will have a chance at new sentences following the Supreme Court's January decision in Montgomery v. Louisiana. Peters received a commutation from Gov. Wolf. Others, such as Henry Smolarski and Tyrone Jones, both of Philadelphia, have agreed to new sentences that will allow them to be considered for parole this month.

The Department of Corrections started running focus groups with juvenile lifers early this year. It is working to get lifers government-issued identification cards and applications for medical assistance. It also developed a protocol, to start 90 days before release and continue 90 days out, aligning the lifers with mentors and support programs. Lifers go through classes and spend the weeks before release in special housing outside the prison walls.

Wetzel says each lifer ought to spend a year in a halfway house. "But no one is required to listen to anything we say," he said. It is also unclear whether funding is available to support such a program; a Corrections Department representative said individuals' needs would likely dictate how long they stay in a such a facility.

At the least, the department aims to pair each lifer with a mentor. Monica Harmon, a University of Pennsylvania nursing professor, is working with her students and inmates to develop a mentor-training program.

Steve Gotzler, who runs mentoring programs for the Pennsylvania Prison Society, said many more mentors will be needed. For now, he has been meeting with juvenile lifers himself in small groups.

"They didn't finish growing up [before they entered prison]. All the normal developmental things didn't get a chance to happen," he said.

They have more questions than most other inmates he has advised - including how to interact with the opposite sex.

"A lot of these guys never had a successful girlfriend before they went to prison," he said.

He tries to coach them in the transition from a world where time moved slowly to one where the pace is frenzied, and from a place with no choices to one where the simplest transaction - buying toothpaste, ordering off a menu - involves a dozen decisions.

"But the biggest things are jobs, housing, family relationships, medical stuff, negotiating the bureaucracy," Gotzler said. And, most of all, "Where's money going to come from?"

After all, short-term supports will help people in their first months out, but this could be a long-term, expensive burden for the city.

"It's going to require resources," said M. Kay Harris, associate professor emerita of criminal justice at Temple University.

"When we don't do such a good job with veterans of connecting them to [services], getting the political wherewithal to devote resources to people coming out of prison, particularly those who've been convicted of first- or second-degree murder, is going to be a political challenge," she said.

Often, the burden of caring for elderly ex-offenders falls on nonprofits, public hospitals, and extended relatives, she said. "That has fiscal consequences. It's just that we don't see the costs as clearly as if we plan up front to see that these needs are met."

Speaking at a conference on reentry run by Eastern University last week, Robert Hammond, the Department of Corrections' juvenile lifer project manager, said prison officials are organizing peer-support groups and lining up referrals. They're also examining inmates' visitor logs, and bringing those with few visits into family reunification programs to reconnect with relatives.

"We're still looking for the financial means," Hammond said. "We can't take care of 507 juvenile lifers for the rest of their lives."

The Philadelphia Reentry Coalition, a collaboration between city and nonprofit agencies, is organizing to fill gaps in support. Joanna Visser Adjoian and Lauren Fine of the nonprofit Youth Sentencing & Reentry Project are cochairing a committee on juvenile lifers. They said advocates have volunteered to work on issues ranging from food-stamp applications to protection from identity theft and fraud.

But they said they were waiting to find out what the Department of Corrections will and won't provide.

For Peters, the transition has been emotional.

He was 17 when he accompanied his 24-year-old brother, Louis, to the home of a 73-year-old woman, planning to rob her. According to news accounts, Peters came downstairs to find his brother beating the homeowner, who later died.

Jackie Rupert, director of the Community Correction Center 2 in Philadelphia, where Peters will stay for a year, said she meets with inmates before they are released and matches them with a peer mentor who is staying at the center. She also arranges any necessary drug or mental-health treatment programs.

By his third day out of prison, Peters had a phone number, but still did not know how to send or receive a text message. He is still with the same girlfriend he was dating at age 17; they may live together someday.

But Kathleen Brown, a University of Pennsylvania nursing professor, who, with her students, had helped him with his commutation application, said Peters was taking it slowly.

"He's totally overwhelmed right now. He's been in there since he was very young," she said. Now, "He's out there and he's like, 'What is all this?' "

Gotzler said that the advice he gives lifers is simple: "Prepare to work. Take things slowly, one step at a time. And don't rush to catch up, because you can't."

215-854-5053

@samanthamelamed