Our seats are arranged in a circle around a laptop connected to speakers. The track is "Dear Mama" by Tupac—a poignant love letter from the late rapper to his mother, apologizing for the jail cells she had to visit him in. Everyone sits quietly, reading the lyrics as the song plays through.

One of the first lines resonates here: "When I was young, me and my mama had beef / 17 years old, kicked out on the streets."

"I feel him, like..." one teenager, quickly wiping away tears, says into a microphone after the song ends. "I got kicked out when I was 17, and my mom wanted nothing to do with me. And my dad, I don't even fuck with him."

The mic gets passed around, as the other members of the circle—all dressed in their brown jumpsuits, with white socks and black velcro shoes—react to the 1995 ballad. Some don't say much; others open up. The mic eventually makes its way back to another teenager who refused to talk the first time around.

"My mom is the strongest woman I know," he says. "She did everything for me, and she did it all alone."

He pauses, putting the mic down before shaking his head and continuing with a small laugh, "And now I'm in jail."

It's Friday night on Rikers Island, and about 15 teenagers from the Robert N. Davoren Complex (RNDC), a facility for male detainees, are in the classroom. Math and science textbooks line the wall, along with portraits of famous African-American leaders, including Martin Luther King Jr. and Harriet Tubman.

Our two-hour lesson in hip-hop has just begun.

In January 2015, New York City's Department of Correction (DOC) decided to ban solitary confinement for detainees at Rikers who are 21 and under. (That ban was already in effect for 16- and 17-year-olds but remains on hold for those 18 and up.) The decision, unanimously approved by the Board of Correction, came on the heels of horrendous headlines for the notorious institution. But the tragic story of Kalief Browder, who was confined for three years on the island without trial—coupled with other cases of beatdowns, corruption, and gang violence—continued to plague the massive jail complex.

Finally, it seemed like the city, led by Mayor Bill de Blasio and Correction Commissioner Joseph Ponte, wanted to do something about it.

Calls to close the place completely have since picked up steam, but correction officials last year released a 14-point "anti-violence agenda" that includes something called idleness reduction programming. The idea is to provide educational opportunities for detainees of all ages, so instead of getting involved in gang or violent activity behind bars, they get busy working toward a healthy reentry to society after Rikers. It's a more hands-on approach to reducing recidivism—a remedy that officials and activists have sought in New York, nationwide, and abroad.

The city will invest millions in these programs over the next few years, offering a tangible test of how firmly the old guard(s) at Rikers can hold firm against change. The classes range from acting and meditation to job readiness and vocational training.

"Beats, Rhymes, & Justice," a weekly workshop that teaches young inmates how to write lyrics and make beats, is one of them.

Ryan Burvick, co-owner of Audio Pictures

Since last March, Cameron Rasmussen, Ryan Burvick, and Darnell Hannon, along with a handful of other coordinators, have crossed the bridge to Rikers dozens of times. The program has just gone through its fifth cycle—which is to say five groups of inmates from different houses have achieved the class's ultimate goal of writing and recording a full-length song after five weeks.

After the cycle ends, the teenagers receive a certificate of completion to show to their parole officers, and the completed track is played out loud to the inmate-turned-producers' loved ones at a family event. If and when they get released, they are also invited to Carnegie Hall, where Columbia University has a program for them to continue working on tracks.

Before we get started, Officer Nishaun McCall, our escort, asks the young men what they want to do when they got out. One inmate says he wants to write a book—"about my time in jail... I wanna finish it before I'm done here." Another inmate begins to respond, "Hopefully, if I get out..."

McCall quickly interjects, "When you get out."

"It's a program, but it's also a project," Rasmussen explains to me. "For years, we've been investing in jails and prisons, and divesting in communities. For a paradigm to shift, we need to deal with this issue on both ends—before you go in, and when you come out."

Rasmussen works as a program director at Columbia University's Center for Justice, which is also in charge of "Social Enterprise Startup," a business-brainstorming class for inmates. When the program was first hatched, he reached out to Burwick and Hannon, who co-founded Audio Pictures, a production group based in Queens. They're in charge of the gear: iPads, keyboards, headphones, and other studio equipment.

Every session starts with a song. The track is played, and its lyrics are discussed in a circle, which basically functions as a cypher. This time, it's Tupac's "Dear Mama," but in the recent past, the class favorite has been "Real Friends" by Kanye. Nas's "One Love" from his 1994 debut album Illmatic is popular, too—the song is essentially a letter to a friend doing time inside.

After the track plays, a conversation is started through questions emphasizing self-improvement, such as "Who inspires you?" By the end of our session, the inmates are lively and engaged.

Things really kick into gear when the class breaks off into two groups: rhyme-writing and beat-making. In the other classroom, iPads are set up with mixing software and splitter jacks, so several people can listen to a beat at once. One inmate lets me sample his, and his beat carries a dense drum track with a frenetic video-game sound to it—kinda like a trap version of Sonic the Hedgehog. He calls it "Heat."

Linda Eaddy, the director of community partnerships here, watches the inmates as they rock their heads to different loops and boast about their creations. She praises Commissioner Ponte for sending Rikers workers to other detention facilities nationwide to study similar programs. "I've been here for 28 years," she tells me, "and I couldn't have ever imagined anything like this."

Back in the lyric-writing room, several inmates armed with rhyming dictionaries sketch verses about smoking weed, hanging with friends, and dealing with drama—which is to say classic teenage shit. There is barely any mention of Rikers. These are just kids being kids.

The whole thing feels a lot like high school: there are class clowns, shy students, inside jokes—that communal feeling that can only really be achieved during sixth period. When the inmates present their work at the end, they jeer and applaud each other. And once it's over, everyone seems to be riding high.

"When we're there, we're not in jail—we're in the studio," Burwick explains. "And we try to live in that moment."

To check yourself out from Rikers—if only mentally—isn't exactly easy, though. Before we arrive, our cellphones are taken, as are our bags, dutifully searched by security. We pass inmates on the way in, and correction officers show up promptly at 8 PM to corral the kids back to their cells. "Every time I see the inmates line up," Burwick says, "I know where I am."

I am not allowed to quote any inmate's name, or ask about their pending criminal charges. And we're already running late when I arrive: a lockdown at a different Rikers facility has put the place on alert—a frequent occurrence.

Cameron Rasmussen

Rasmussen says just being in that classroom is what's most important; it lets inmates feel human. Conversely, when there's tension in the jail, it's palpable. Hannon tells me he once saw one of his own former students locked up—he hadn't seen him in two years, when the kid was still in ninth grade.

But just hanging out, listening to rap, and creating music when you're on Rikers Island is something so simple and human as to be priceless. It's an opportunity for them to escape all of the fear and alienation, at least for two hours a week.

"You are the freedom that they see," Rasmussen tells me. "It's a seed."