Over seven seasons, the Netflix series set in a women’s prison in upstate New York has compelled viewers to see how corrupt institutions can be.Netflix / Chad Griffith / Paul Spella / The Atlantic

There was a moment during the seven years Jenji Kohan spent writing Orange Is the New Black when she spoke with a friend who was shooting a television series in Paris. “I was joking with her like, ‘You’ve written yourself into Paris and I’ve written myself into prison,’” Kohan told me on the phone earlier this month. “‘And you’re a genius and I’m an idiot.’ I spend my days in prison! And there’s nothing good to steal from the set to put in my living room.”

When we spoke, Kohan hadn’t quite wrapped her head around the fact that Orange was ending—that the show she’d created and reshaped and experimented with since before streaming television even existed was almost over. During the final few days of shooting, when actors and crew members were crying and hugging and commemorating the last times they’d all be together or shoot in specific spaces, Kohan couldn’t conceive that they wouldn’t all be reuniting again in a few months to shoot another season. “I have a feeling it might creep in and there might be a delayed reaction or breakdown or whatever it is,” she said. Still, she feels some relief, too. For seven seasons, Kohan has been preoccupied with stories about injustice, repression, tragedy, and exploitation. There was humor, of course, and there were moments of joy and freedom, such as the transcendent lake scene at the end of Season 3. But for the most part, Orange was a show built on the understanding that “liberty and justice for all” is a lie.

Over seven seasons, the Netflix series set in a women’s prison in upstate New York has compelled viewers to see how corrupt institutions can be; how black and brown people are set up to fail by racist systems; how bad luck is often the only thing separating the people in prison from the people outside. Orange changed ideas about what television could be, and whose stories could be told—even whose stories matter the most. And while the show was in production, the scenarios Kohan and her team were writing about became more and more prominent in the news cycle. Business for private prisons boomed. A Season 6 story line about prison guards competing in a game called “Fantasy Inmate”—winning points for fights, overdoses, and suicide attempts that happened under their watch—seemed to anticipate the exposure of a strikingly callous Facebook group for Border Patrol guards.

“I joke that I’m a witch,” Kohan said. “That’s how we know what’s going to happen. But … I’m not entirely joking. I think if you really listen to the hum underneath everything, you can sense what’s going on a little ahead of time. Because so many people aren’t listening.”

When Orange debuted in 2013, it was one of the first shows commissioned by Netflix, which was better known then as a mail-order-DVD distributor than as the most prominent force in the television landscape. Loosely inspired by Piper Kerman’s memoir of the same name, Orange Is the New Black told the story of Piper Chapman (Taylor Schilling), a Brooklynite purveyor of artisanal soaps whose past smuggling cash for her ex-girlfriend’s drug operation saw her sentenced to 15 months in a women’s correctional facility. The first few episodes introduced Piper (and viewers) to the realities of prison life in Litchfield Penitentiary: the food, the shower shoes, the bureaucratic layers, the segregation, the multidimensional utility of maxi pads.

But Piper, Kohan told Terry Gross on NPR’s Fresh Air that year, was really just a front, a “Trojan horse” for the other characters whose lives she wanted to explore. Piper’s fish-out-of-water narrative might have helped sell the show, but it was an ensemble piece that gradually proved how much richer and more compelling the stories of its other inmates could be.

Orange looked unlike anything else that had been on television at the time. Its sprawling, predominantly female cast reflected the demographics of the prison system itself, with a multiplicity of races, ages, and socioeconomic backgrounds. It was among the earliest TV shows to feature a transgender character, Sophia Burset, played by a trans actor, Laverne Cox, and to use that character not for an easy punch line, but to explore the myriad challenges Sophia faced in prison: verbal and physical abuse, the denial of her hormone dosage, solitary confinement. Orange used flashbacks from the very beginning to emphasize that its characters were more than the crimes they’d committed—many of them were products of circumstances that had set them up to fail. And it used the stories of prison guards, wardens, and corporate executives to complicate simplistic ideas about good and bad, right and wrong. Only certain kinds of offenses, it emphasized, were punishable by law. Others simply led to promotions, or record stockholder bonuses.

The breadth of characters made for a knotty writing process, which only intensified as the seasons went on and more and more inmates were introduced. The walls in the writer’s room were covered with dry-erase paint, which Kohan and her team covered with lists and charts and timelines to keep track of all the threads in play. It could get intensely complicated, Kohan said: “And some people do get shortchanged. Some stories grow larger and eclipse other stories, and, you know, there are trade-offs and sacrifices in service of the narrative.” By Season 6, there were upwards of 75 characters, which led to the decision to prune things back to a core crew. Season 7 (which airs tomorrow) keeps the focus tight, but sporadically brings back old faces into the mix, in cameos that underline the strange, joyful intimacy of seeing them again.

The last 13 episodes also follow the darker trajectory the show has taken since the third season, when the prison system (and particularly the corporation that ran Litchfield) became the main antagonist threatening the lives and well-being of the inmates. At the end of Season 4, a guard suffocated Poussey Washington (Samira Wiley) while restraining her, one of the most heartbreaking moments in the show’s history. Poussey, the show later elaborated, had been imprisoned for possessing half an ounce of marijuana, a “crime” so commonplace that even the guard who killed her had committed it. In the aftermath of Poussey’s death, Litchfield inmates rioted, demanding justice. They didn’t receive it. Another series of catastrophes ensued when SWAT teams accidentally killed a prison guard and implicated the inmates, leading to the wrongful conviction of Tasha “Taystee” Jefferson (Danielle Brooks) for murder.

Orange’s balance between light and dark has always been a capricious one. Kohan’s jocular instincts underpin the series, to the extent that its debut was nominated as a comedy at the Emmy Awards (the Academy later shifted it into the drama category for Season 2). Schilling’s madcap, doe-eyed energy makes Piper an easy figure of fun, while the chemistry between Taystee, Suzanne (Uzo Aduba), and Cindy (Adrienne C. Moore) is one of the show’s most distinct assets. But as the story lines have gotten bleaker, and more realistic, seeing the funny side of life in Litchfield has become harder. Season 7 deals with the detention and deportation of undocumented immigrants, a subject that’s devoid of lightness. The cruelty on display is absurd, as when a prison official brags about the boost in federal funding for detention centers and the growing list of deportable offenses being a boon for business. But it isn’t funny. Which leads to the question of how Orange—complicated, flawed, but always openhearted—is going to end. With hope, or with realism? With tragedy, or with redemption?

The challenge of wrapping up a show like this one, Kohan said, was an imposing one: “I didn’t have a specific vision, because I was mostly terrified. How do you wrap up seven seasons of this? And, knowing myself, it’s never going to be good enough. It’s never going to be totally right.” The writers knew that they didn’t want to tie up every loose end, but also that there were stories they did want to finish, and issues they wanted to explore. “And I wanted to entertain, as well,” Kohan said. “That’s the first job. You’ve got to give people a good story that they’re engaged with, and characters that they want to spend time with.” If you start out being an issues show, or trying to change the way things work, “you’re never going to get something that anyone’s interested in. It’s like trying to give people medicine.”

That being said, one of the hallmarks of contemporary TV shows in the post-Orange era is an eagerness to engage with issues that might have alarmed producers in earlier decades. But few series grapple with ideas so fearlessly, and in such plain sight. “I have certain politics,” Kohan said. “I have certain beliefs. I have a way that I wish the world would operate. I impose that. But I also think I argue with myself in the show as well. And it definitely has certain leanings, but there are characters who poke holes in those things as well.” (A brilliantly eccentric moment in the final season sees two characters arguing over what the British reality series Love Island says about Brexit.)

As Orange’s themes got darker, so did its worldview. The third season seemed to explicitly state that in a cruel and unjust world, kindness could have its own power. By the end of the fourth season, the series seemed to have accepted that hope, compassion, and civility weren’t enough to overcome profound inequity and prejudice. In the final episodes, the system is still stacked against the Litchfield inmates, even after they’re released, as the show explores in Piper’s life postprison. Affirmation isn’t easy to find, whether characters are unjustly incarcerated or paying hundreds of dollars for the privilege of peeing into a cup on a weekly basis. Joe Caputo (Nick Sandow), who’s evolved from a sleazy prison administrator to a morally enlightened advocate for the inmates over the course of the show, begins leading restorative-justice classes that make explicit questions Orange has always asked: How can justice be found in a world that’s profoundly unfair? What does change look like in a system that’s so markedly rigged?

It’s a cliché, at this point, to say that change starts with empathy. Nevertheless, that’s where Orange began, and where it ends. “I love crossroads,” Kohan said. “I love situations where people are forced to deal with other people who are unlike them, who have very different experiences, who come from a very different place … In those interactions, you have to find common ground and find a way to deal—or not.” The shows she’s created and shepherded, from Weeds to Orange to GLOW, are about characters who find themselves outside of their orbit, thrust into new situations with unfamiliar people. “It just makes for great drama and friction and humor.”

The setup is also akin to experiencing TV or movies or books, where audiences find stories and people they might otherwise never encounter. As Orange Is the New Black ends its run, its themes and issues feel less like fiction than they ever have. But its characters do, too. Six years ago, women such as Taystee and Suzanne had to be snuck into the spotlight of a mainstream television show. Now their stories stand front and center.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.