Image caption The difference between life in prison and freedom: 15 months

Sammy Maldonado is 15 months older than his brother, David. The age difference is the reason that Sammy may spend the rest of his life in prison for a murder he did not commit, while his brother - the actual perpetrator - is going free.

On 13 August, 1980 - the day that blew the Maldonados' lives apart - Ted Kennedy had just conceded to Jimmy Carter in the Democratic primary for president. Stanley Kubrick's The Shining was terrifying American movie audiences, and the Iranian hostage crisis was sliding into its 10th month.

It was the end of a long, hot summer day, and teenagers David and Sammy decided to escape from their bleak urban surroundings in northern Philadelphia to an idyllic spot called Devil's Pool.

The brothers piled into a friend's 1970 Mustang, stopped off for a gallon of cheap wine, and drove into the park. They hiked down the footpath from the car park until the trees parted around a rocky outcropping that looked down on a deep, creek-fed basin of water. Swimmers launched themselves from the rocks and into the cold, dark water, drank beers and smoked pot.

Image copyright Rosie Lopez Image caption David (left) and Sammy before prison

Before long the Maldonados had befriended another group of teenagers who traded their beer for the brothers' joints. They drank and listened to a kid strumming a guitar, until both boys were drunk, high and feeling bold.

According to court documents, at some point, one of the boys decided "to steal the white kids' box" - a cardboard box they hoped was full of valuables. As the light was fading, Sammy snatched it and took off running. David followed, grabbing a steak knife from the other teenagers' picnic supplies.

The other group gave chase, and Sammy and David got separated from the rest of the group with 19-year-old Steven Monahan hot on their tail. According to the testimony at trial, Sammy almost immediately abandoned the box - which among its treasures held a $10 bill, a report card, and a comb - and Monahan tackled him. David jumped on to Monahan's back and stabbed him twice with the steak knife. Monahan fell, and the brothers took off into the woods.

Back in the parking lot, they flagged down their friends and climbed into the Mustang heading back into the city.

"I think I killed him," David said from the back seat, and started to cry.

Thirty-seven years later, the Maldonado brothers sit beside each other in the visiting room of the Pennsylvania State Correctional Institution at Graterford in identical faded crimson jumpsuits. They've aged from scrawny teens into middle-aged men. Sammy is the quieter one, with a smooth bald head and professorial glasses. David is taller, lanky with thinning dark hair and a moustache that has turned more salt than pepper. The family resemblance is in the eyes - the same slate grey colour.

After Steven Monahan died - his aorta punctured by one of the stab wounds - both boys were convicted of second-degree felony murder and sentenced to mandatory life in prison without the possibility of parole. Because of the laws on the books in Pennsylvania, the judge in the case had no say on the sentences, even remarking at the time: "I think it's harsh, because I never would have sentenced you to a life term in prison under these facts."

They've spent nearly their entire time in prison in the same facility; Sammy's cell at Graterford is just 15 cells away from David's. Because they're housed on the "honour block", they can visit each other several times a day. Like all brothers they argue and get on each other's nerves, but today there is reason for some levity: in just a few weeks' time, David is going free.

"I'm elated for him," says Sammy.

David's emotions are more complicated.

"It's bittersweet," says David. "I hate to leave Sam."

They were both supposed to die in prison. But a series of recent US Supreme Court decisions has changed everything for David, who was 17 at the time of the murder, and classified as a juvenile.

In the 2012 case of Miller v Alabama, the high court decided mandatory life sentences for juveniles constitute a violation of the US constitution's eighth amendment, which bars cruel and unusual punishment.

Four years later, the justices ruled that the Miller decision should be retroactive, meaning the roughly 2,300 men and women across the US who'd been sentenced to life in prison as children had a right to be resentenced, and therefore eligible for parole and release.

"Because juveniles have diminished culpability and greater prospects for reform… they are less deserving of the most severe punishments," Justice Elena Kagan wrote in the Miller decision.

"Our decisions rested not only on common sense - on what 'any parent knows' - but on science and social science as well."

Image copyright Getty Images Image caption A series of recent Supreme Court cases led to David's freedom - but not Sammy's

The state of Pennsylvania holds the most "juvenile lifers" in the country - more than 500 inmates. The state's county judges have been slowly making their way through them in the resentencing process, starting with the greyest lifers - the longest serving inmate was a 79-year-old man who had been in prison for 63 years. As of May 2017, 40 juvenile lifers have been released in Pennsylvania.

On 13 December 2016, it was David Maldonado's turn. He went before a judge who heard how he went from being a drug addict to earning a master's degree, and about his work counselling other inmates.

Although the family of the victim was opposed, the judge resentenced him to 30 years and not long after that, the Pennsylvania parole board approved his release. (The Monahan family did not respond to requests for an interview.)

But the Supreme Court decisions that freed David have no effect on his brother's case. On the day that the murder took place, Sammy Maldonado was 18 years, four months and 10 days old - legally speaking, an adult.

Even though it was David who stabbed Steven Monahan, in the eyes of the law, Sammy's age of 18 automatically classified him as a fully mature adult, capable of making the same decisions as a 40-year-old, while his brother was a juvenile with a still-developing brain who required special consideration.

"Sammy didn't do the stabbing, he got beat up - but he was 18 years," says Michael Wiseman, a lawyer for both men. "He is far less culpable than David."

Asked if he would consider himself an adult when the crime occurred, Sammy answers: "No, no, I can answer that empathically. No. I was immature, I was impetuous. When you're young like that you're easily influenced."

Image caption David Maldonado walks out of a Pennsylvania prison after 37 years

A few months later, on a bright, sunny day in May, David Maldonado emerges from the front doors of Graterford prison carrying a cardboard box of his belongings. He wears a brand new shirt and slacks that a friend who came to pick him up brought - he nearly walked out with the price tags still attached.

The prison lobby broke into a tiny celebration as he left, with strangers, inmates and correctional officers alike clapping him on the back and wishing him the best.

Before heading back to Philadelphia, David and his friend stop at a nearby diner for some coffee, where he confronts his first free-world challenge. The tables are pushed too closely together for his comfort, and his back is nearly touching a woman seated behind him. It makes him nervous, he keeps glancing over his shoulder before asking if he can switch seats.

"What is your problem?" the woman's husband suddenly barks.

"Nothing," David says.

"It's the third thing you've said about her," the man shouts.

"I didn't say nothing," David says. "I didn't say nothing."

After a few tense moments, the man returns to his meal.

"I gotta learn to tolerate certain stuff that in prison I wouldn't tolerate," David says. "I gotta remember I'm not in prison no more."

That's the kind of impulse control David and Sammy would argue they did not have as teenagers when they committed the crime. A growing body of scientific research would agree with them, and some advocates say the same research that gave David a second chance should apply to Sammy, too.

Image copyright BJ Casey/Temple Law Review Image caption Prefrontal circuitry (in green) continues to change into adulthood

In 1993, a 17-year-old Missouri boy named Christopher Simmons was sentenced to death for the robbery and murder of a 46-year-old woman. Simmons' lawyers argued all the way to the Supreme Court that it was cruel and unusual punishment to execute a "developmentally immature" person. The case gained some unexpected allies - the American Medical Association and the American Psychiatric Association, among others.

For the first time, a cadre of psychologists and neuroscientists submitted the argument that it was inappropriate to execute juveniles because their brains haven't finished developing. They said that MRI scans of the brains of juveniles and adolescents show that well into a person's early 20s the brain is continuing to add grey matter and the prefrontal cortex - which is believed to regulate self-control - is developing.

"The brain continues to change throughout our entire lifetime, but there are massive changes still happening into the 20s," says BJ Casey, a professor of psychology and director of the Fundamentals of the Adolescent Brain lab at Yale University.

In 2005, the justices decided in the Simmons case that due to "evolving standards of decency" those 18 years and younger could not be executed by the state - it was the first time the court factored in developmental science. The court cited several neurological and psychological studies in the Miller and Montgomery decisions as well.

Since then, the evidence has only grown showing that the brain is far from finished changing by 18, and major development continues up until the age of 24 or 25. Neuroimaging shows that the brains of young adults aged 18 to 24 respond differently than the brains of older adults when making decisions, assessing risk, controlling impulses and resisting peer pressure.

"It's quite clear that, at least in the United States, we choose our legal boundaries for reasons other than scientific ones," says Laurence Steinberg, a psychology professor at Temple University and an expert in the field of adolescent brain development.

"If you're looking for a boundary that's an answer to the question, 'When do people stop maturing?', 18 is clearly too young."

Some neuroscientists and psychologists like Casey argue that young adulthood should be treated as its own distinct phase of life, separate from childhood and adulthood. She says that young adult brains simply do not function the same way that adult brains do when under stress or threat.

"They're far more impulsive in threatening situations, they're significantly different from adults over 21," she says.

Image copyright Reuters Image caption The Supreme Court rulings also have implications for Lee Malvo, who was 17 when he took part in the Washington sniper attacks

Both Sammy and David say that in their first few years in prison, they were terrors - drugs were easy to obtain and they graduated from smoking weed to shooting heroin. They fought other inmates, and coped with their fates by spending as much time as possible in an intoxicated stupor.

But by their early 20s, they'd both lost interest in drugs. Sammy took up boxing, as evidenced by a few missing teeth, and eventually became a born-again Christian. David started going to classes and earned his GED (a certificate equivalent to a high school diploma).

"I had to start doing the time instead of letting it do me," he says.

By the time of his release, David had earned a masters of theology and was working as a drug and alcohol counsellor for Spanish-speaking inmates. Sammy - who says he spends most of his time alone in his cell studying the law and the Bible - has a job as a teacher's aid for inmates working towards their GEDs.

"I'll be 54 next month, he just turned 55," says David. "We're not the kids we were. We don't have the problems we had back then."

There's at least one court case making its way through the system that could result in a similar game-changing decision for people like Sammy.

Ted Koch is a lawyer representing Luis Noel Cruz, an inmate in Connecticut who committed a murder on the orders of the Latin Kings gang when he was 18 and a half years old. A federal judge has agreed to hear arguments later this year that the Miller decision should apply to someone who was just past his 18th birthday.

"It's arbitrary - the science doesn't draw bright lines, so the law shouldn't either," says Koch.

The idea that young adults are simply different from both juveniles and adults is gaining some traction - states like Connecticut have opened special wings of their prisons to house inmates 18 to 25, with an eye on rehabilitation and even a path towards criminal record expungement.

Just this spring, San Francisco opened a young adult court - citing the latest developments in neuroscience as the reason for its existence - specifically for offenders ages 18 to 25. There are similar courts in New York and Idaho.

Nevertheless, the movement to change national and state laws to include special considerations for 18- to 25-year-old lifers is still in its infancy.

Though there is no national estimate of how many inmates would fall in this group, in the state of Pennsylvania alone it's 2,203 men and women.

"[Nationwide], it's certainly going to be a very big number," says Ashley Nellis, a senior research analyst with The Sentencing Project.

Koch believes there are likely to be similar challenges coming from inmates like his client, those just over 18 when their crimes were committed, who will argue that the Miller decision should apply to them.

"I think there's a wave coming behind me," says Koch.

Image caption David, on the outside, Sammy, on the inside

A month after David's release, Sammy sits alone in the visiting room. His arms are dotted with faded, blueish tattoos, including a chain wrapped around his right wrist - another relic of his impulsive youth. Once he gets released, "I'm gonna have them removed," he says.

Sammy has complete confidence that he'll walk out of Graterford some day, although his legal avenues are limited. He will either need to earn a commutation from the Governor of Pennsylvania - which is rare - or there will need to be a change in law.

One of his greatest regrets is that his release could not happen before the deaths of their parents. Although the Maldonados' childhood was marred by physical abuse, alcoholism, and general tumult - in his 17 years outside, David Maldonado lived at 20 different addresses and attended 13 different schools - the family reconciled after the boys went to prison. According to their aunt, their father worked three different jobs trying to afford better lawyers. He died in 2010, 28 years after he started coming to see his sons on a consistent basis.

"I wish I could have had those 28 years back, but it's gone," says Sammy.

For now, he sits in his cell, studying or working at his typewriter with his television on and the sound turned off, waiting for his chance to join David in the free world. Even though it was David's actions that landed them both in prison, Sammy says he bears no ill will towards his little brother.

"Guilt is a very, very strong emotion. I know it's tearing at him," says Sammy. "Tell David not to worry about me. Stress to him I'm OK and I'm going to get out of here."

The following day, David Maldonado is hoofing it down a hot, sunny street in West Philadelphia, poking his head into various cheque-cashing places and bodegas to see if they can wire money to Sammy's prison commissary account.

"I want to send him $50 as soon as I get to the right place," he says.

His face is fuller - he's gained seven pounds since his release - and his cheeks are tan from his work clearing litter from a park in North Philadelphia. He's been hired as an alcohol and drugs counsellor, he's looking for an apartment, and slowly reconnecting with family and friends. He even tried lobster for the first time (he was not a fan).

David is hopeful that the simple fact that he is out, and doing well, will help Sammy's case once he applies for commutation.

"I take responsibility for what I did. I shouldn't have did what I did. [The victim] didn't deserve what I did," says David.

"If you let me out and I'm the one who did it and you trust me to be out here, I don't see why you can't trust [Sammy]. He didn't do nothing."