When Clemency bows Sunday evening at the Sundance Film Festival, the buzzy film will mark the culmination of an eight-year odyssey for the film’s writer-director, Chinonye Chukwu. Set in a maximum-security prison, the film centers on dutiful prison warden Bernadine Williams (Alfre Woodard) and her struggle to maintain her humanity while she carries out executions in an unnamed U.S. state where capital punishment is legal. It’s a journey that took Chukwu, a Nigerian-born, Alaskan-raised filmmaker, deep into the prison system, where she volunteered on clemency cases, met with wardens and lawyers and death-row inmates, and tried to understand the system from the inside out.

All of it was sparked by Troy Davis, a Georgian man who, despite maintaining his innocence for 20 years, serious doubts about his conviction, and appeals from world figures such as former president Jimmy Carter and Pope Benedict XVI, was executed back in 2011.

“From the morning after Troy Davis was executed, I asked myself, if so many of us were navigating these complex emotions surrounding his execution—frustration, anger, sadness—what must it be like for the people whose livelihoods are tied to taking human life?” said Chukwu, who, having just arrived at the Sundance Film Festival, was brimming with enthusiasm. “I knew at that moment I really wanted to explore the emotional and psychological complexities of the prison staff, particularly a warden.”

In 2013, she began her research process. While teaching film at Wright State University in Dayton, Ohio, Chukwu volunteered on a woman’s clemency case, shot video testimonies that would be used in hearings, and created a film program for female inmates.

“I felt like, if I’m going to tell a story that is representing an incarcerated population, I was personally obligated to give of myself in some way to that very population,” she said. “That is one of the reasons why I volunteered on this clemency case. It also helped me get very up close and personal to the toll it took on all of the people involved—family, friends, lawyers.”

The result is a story we rarely see in film, that of a warden who is plagued by the prison’s most recent execution—a botched attempt that caused the inmate severe pain before killing him—but is still required to prepare her staff and an inmate (Aldis Hodge) for the next one, her 13th. Meanwhile, the inmate’s lawyer (Richard Schiff) fights to keep him alive, and her husband (Wendell Pierce) tries desperately to reconnect with her.