The final scene in the series finale of “Nurse Jackie” is sure to spark debate among viewers. It was argued about after the fact even among the writers of the Showtime dramedy that wrapped its seven-season run on Sunday night.

SPOILER ALERT: Stop reading if you have not seen the “Nurse Jackie” series finale, “I Say a Little Prayer.”

The episode closes with Edie Falco’s Jackie Peyton collapsing at All Saints Hospital from a presumed drug overdose, having snorted multiple lines of heroin a few minutes earlier. As her coworkers rush to help her, the camera zooms in on Falco lying prostrate on the floor. Her eyes open a crack and her lips move ever so slightly while Merrit Wever’s Zoey strokes her hair and tells her “You’re good, Jackie. You’re good.”

So does she die in the end? Clyde Phillips, exec producer and showrunner of “Jackie” for its final three seasons, said the final shot was left open to interpretation on purpose. But in his mind, she is still alive.

“I welcome that conversation (about the finale),” Phillips told Variety. “I hope the show will be talked about in a healthy way for a while after it ends.”

Phillips co-wrote the teleplay for the finale with Tom Straw from a story by Liz Flahive. Abe Sylvia directed the half-hour seg. Phillips sees Jackie as surviving the collapse but once again facing the bottom falling out of her life after she spent so many months convincing her coworkers that she was finally sober.

With All Saints closing for good, Peyton secures a new job and has made strides in repairing relationships with her friends, daughters and even her ex-husband. But in an instant, all that trust and undoubtedly her new nursing position at Bellevue vanishes.

“One of our ambitions has always been to have people understand the ferocity of the disease she has, and to have compassion,” Phillips said. “If Jackie had cancer, everybody would be completely compassionate. This disease she has causes her to hurt other people because it’s such a narcissistic disease. All she cares about is her next hit.”

Phillips said the writing team went into the final season with a different ending in mind. They sketched out a plan to have Jackie appear to die after a fire breaks out in the ER. Jackie braves the flames to save the heroin addict character who is handcuffed to a hospital bed in the basement.

Viewers see the flames and the ceiling collapsing on Jackie, but then it cuts to a shot of her squeezing herself out of a tiny window — “like a birth,” Phillips noted. Jackie starts to run down the alley toward the crowd of people standing outside the hospital. But as she gets halfway through she stops and turns to run in the other direction. “She realizes that she’s free,” Phillips said.

The basement set where the hospital staffers have meetings in an effort to stop the closing of the hospital early in the season was built specifically to facilitate the vision of the fiery ending. But ultimately the writers decided that ending would rely “too much on the building and props and not enough about the character and the consequences of what she’s done,” Phillips said. “About half-way through the season we had little trouble turning the boat around and going in that new direction,” she said.

In the final version of the closer, Jackie becomes the last person treated at All Saints. That was meaningful in light of how “Nurse Jackie” offered an unvarnished look at the roller-coaster life of an addict, and the impact they have on those around them.

Phillips said he felt the time was right to bring the show to a close. “We’d played that out as long as we could,” he said. “It was time for the show to end.”

Phillips hailed the depth and bravery of Falco’s performance, down to the final shot. Only someone with her rare talent could have made the character compelling and empathetic enough to endure as a series, offering the benefit of raising awareness and understanding of drug addiction.

“Jackie Peyton is a train wreck. She’s a sociopathic drug addict who has destroyed everything in her life. There’s one reason (viewers) have stuck with it for seven years, and that one reason is Edie Falco,” Phillips said.

Collaborating with Falco “was a dream,” Phillips added. “She’s the best actress I’ve ever worked with.”

Among Phillips’ other insights about the finale:

In Jackie’s fantasy sequence of the yoga mob in Times Square, several of the passers-by are references to past patients on the show.

Overt religious references were woven into the episode from start, with daughter Fiona practicing for her confirmation to Jackie washing the feet of a sinner to Eddie’s confession in the chapel that he is going to jail.

Zoey’s line “you’re good” references Jackie’s prayer earlier in the episode and also a line from the pilot where Jackie, via voice-over narration, says: “Make me good, lord, but not yet.”

Tony Shalhoub was “a gift” to the final season in the role of the maverick, terminally ill Dr. Bernard Prince. “The character had to be someone who didn’t represent baggage to Jackie,” Phillips said. “He only cares about saving lives and living in the moment.”

The title of the episode, “I Say a Little Prayer,” is the title of a Dionne Warwick hit penned by Burt Bacharach and Hal David. Yet the song featured in the final scenes is another tune, “(Theme From) Valley of the Dolls,” from the soundtrack to the 1967 movie based on the Jacqueline Susann novel about three young actresses who go astray, with the help of pills and such, while trying to make it in Hollywood. “Say a Little Prayer” and “Valley of the Dolls” were the A and B sides, respectively, of a single released by Warwick that year. But unless my ears deceive me, the recording used in the episode is not Warwick’s version.

Sign Up for Breaking News Alerts

The final scene in the series finale of “Nurse Jackie” is sure to spark debate among viewers. It was argued about after the fact even among the writers of the Showtime dramedy that wrapped its seven-season run on Sunday night. SPOILER ALERT: Stop reading if you have not seen the “Nurse Jackie” series finale, “I […]

The final scene in the series finale of “Nurse Jackie” is sure to spark debate among viewers. It was argued about after the fact even among the writers of the Showtime dramedy that wrapped its seven-season run on Sunday night. SPOILER ALERT: Stop reading if you have not seen the “Nurse Jackie” series finale, “I […]

The final scene in the series finale of “Nurse Jackie” is sure to spark debate among viewers. It was argued about after the fact even among the writers of the Showtime dramedy that wrapped its seven-season run on Sunday night. SPOILER ALERT: Stop reading if you have not seen the “Nurse Jackie” series finale, “I […]

The final scene in the series finale of “Nurse Jackie” is sure to spark debate among viewers. It was argued about after the fact even among the writers of the Showtime dramedy that wrapped its seven-season run on Sunday night. SPOILER ALERT: Stop reading if you have not seen the “Nurse Jackie” series finale, “I […]

The final scene in the series finale of “Nurse Jackie” is sure to spark debate among viewers. It was argued about after the fact even among the writers of the Showtime dramedy that wrapped its seven-season run on Sunday night. SPOILER ALERT: Stop reading if you have not seen the “Nurse Jackie” series finale, “I […]

The final scene in the series finale of “Nurse Jackie” is sure to spark debate among viewers. It was argued about after the fact even among the writers of the Showtime dramedy that wrapped its seven-season run on Sunday night. SPOILER ALERT: Stop reading if you have not seen the “Nurse Jackie” series finale, “I […]

The final scene in the series finale of “Nurse Jackie” is sure to spark debate among viewers. It was argued about after the fact even among the writers of the Showtime dramedy that wrapped its seven-season run on Sunday night. SPOILER ALERT: Stop reading if you have not seen the “Nurse Jackie” series finale, “I […]