A film like “Sing Sing” is a rare, precious thing. An artifact crafted with the utmost care, this is a cinematic work of unique empathy, a slice of hand-turned humanity, hewn from the heart, with rigorous attention paid to the process itself.

How this captivating film was made is almost the more important story, but it is part and parcel with the text on screen. “Sing Sing” is the result of years of research and volunteer work on behalf of writer- director Greg Kwedar and his co-writer, Clint Bentley, with Rehabilitation Through the Arts, a theater program for incarcerated men at Sing Sing Correctional Facility. Kwedar and Bentley tried to mount a narrative film project about RTA but never managed to capture the magic they experienced in the room itself. So they decided to bring the room to the screen, casting a group of RTA alumni alongside stars Colman Domingo and Paul Raci.

In “Sing Sing,” the supporting cast all play themselves (or something like themselves), and give damn good performances too. Domingo steps into the role of John “Divine G” Whitfield, a man incarcerated at Sing Sing who has become a playwright and actor through RTA. Raci plays RTA director Brent Buell with irascible warmth, while one of Domingo’s longtime collaborators, Sean San Jose, gives a terrific performance as Mike Mike, Divine G’s close friend. However, the true star-is-born moment in “Sing Sing” belongs to Clarence “Divine Eye” Maclin, playing himself, a man hardened by his past and present, who finds grace and tenderness in theater.

The plot follows the production of RTA’s first original play, a sprawling time-travel comedy that moves from ancient Egypt to gladiator arenas to the Old West, with a visit from Freddy Krueger too (it’s based on the real Buell play “Breakin’ the Mummy’s Code,” detailed in a 2005 Esquire article by John H. Richardson). But the film is about more than just these men putting on a show. It’s about the hope and heartbreak within these walls, the personal growth and triumph that these men experience together onstage. It’s a stark reminder that life in prison is still life, in prison.

Kwedar and Bentley’s screenplay is deft and subtle, personal back stories emerging organically in conversation. They also make the powerful choice to skirt melodrama and avoid the kind of violence one might expect from a “prison movie.” There is loss, grief and disappointment, but this is not a sensationalized portrait of life behind bars. It’s a humble assertion that life here continues on in all its tragedies and triumphs: Loved ones are lost and challenges seem insurmountable, but hard work pays off, and there are still happy surprises to be had.

In this deeply empathetic depiction, “Sing Sing” is a powerful argument for humanity within a space designed to dehumanize. RTA is an oasis from this institution where everyday life is rife with the kind of large and small humiliations and nagging reminders that their time and lives are not their own, with lineups, room searches and parole hearings shaping their reality.

Domingo is the kind of actor who can do anything, but he does this kind of quietly dignified, heartbreakingly hopeful character better than anyone. He is the beating, bleeding heart of “Sing Sing,” but he allows his troupe of players to shine even brighter and take center stage. San Jose delivers a monologue that is one of the most devastating scenes on film all year. But Maclin steals the whole movie performing his own personal journey, as a man who allows himself to crack open and let the light — and love — in.

MPA rating: R (for language throughout)

Running time: 1:45

How to watch: In theaters