“Jane The Virgin” is coming to an end on the CW with a fifth and final season but series creator and showrunner Jennie Snyder Urman and series star Gina Rodriguez have known this would be the end for quite some time.

“Around the second year Mark Pedowitz said to me that the show will go as long as the story goes. That is a gift, if you work in TV, that you don’t always get, and I was really grateful to that because it let me plan,” Urman said at the CW’s Television Critics Assn. press tour panel for the show Thursday.

Urman said she told Rodriguez around the third season that they had two more years worth of story “if you’re good.”

“Gina and I are real partners. She’s the one I come to with any and everything. We’re a team,” she explained.

Throughout the course of the five seasons, Urman shared that what she has taken away personally is “how much representation matters” and how important it is to be seen. She added she has taken out of the job how to lead with empathy, as well.

For Rodriguez, she shared she learned “about the spaces in which I could really create change.” What she feels the most grateful for are the opportunities Urman has given her, she said, and she is really hopeful to do “for someone else what Jennie did for me” as she continues her career of producing and directing, in addition to acting.

Although she admitted that because she has yet to direct a feature film, she can only look at statistics, rather than personal experience, to know for sure whether or not television offers more of these opportunities than film.

“I have been extremely privileged because of Jennie’s guidance,” Rodriguez shared.

What she hopes now is that others create more opportunities, as well. “If your studio is hiring one female director, hire two,” she said. “It may seem small, but it’s already a big shift.”

When it came to what Urman wanted to do on-screen before the series’ end, though, she said “the theme this year is things coming full circle.” Urman wanted to revisit storylines and emotions that mirror “where we started but show how these characters have grown and changed.”

In the fifth season premiere, for example, Urman said, there is a moment in which Rodriguez goes to Rafael (Justin Baldoni) in a yellow dress, which mimics a scene she previously performed when Jane went to Michael (Brett Dier) to choose him out of the love triangle.

Over the years, Urman noted that “in constructing the love triangle we knew we had to make both men worthy of Jane” because if one was less than, it would reflect back, negatively, on Jane. Each year would focus on a different part and provide each man different agency, with Urman asking her writers’ room at the start of each season who was “Team Rafael” and who was “Team Michael,” with goal being “to flip it over the course of the season.”

The final season of “Jane The Virgin” starts with the answer to whether or not Michael (Brett Dier) is truly back from the dead. It’s a telenovela trope that Urman pointed out has been threaded through the show-within-the-show but one that she still worried about executing “in a way that is both believable enough and also true to the tone and the spirit of the show.”

The central moment of the final season premiere is a seven-page monologue for Jane where she works out her feelings about the recent turn of events out-loud, to her mother (Andrea Navedo) and grandmother (Ivonne Coll), as she paces around her house. Rodriguez also directed the this episode, and she called this moment “a phenomenal challenge.”

The scene, which was shot by Rory Robert Knepp using a Steadicam in a oner, was attacked first technically, Rodriguez shared. “I went to theater school. I can remember an entire play… That’s just the way I work. And when I saw this seven-page monologue, I was like, ‘All right Jennie, let’s do this,'” Rodriguez said.

Then it was about figuring out the specific choreography and making sure she hit each beat, she shared, making sure it “flowed organically.” The scene ended up being a “great dance,” added Urman, who said they had five takes of the scene and that any one of them could have been put in the final cut.

Urman added she also wants “a real sense of closure at the end.” The philosophy in the writers’ room has been how to have cake and eat it too — “really have it all and have these big family moments. I want to say goodbye in the right way, and I want to stick the landing, and it’s a lot of pressure, but I really want to.”

Added Rodriguez: “I don’t know what’s going to happen to me, emotionally, after the show is done because you don’t get opportunities like this.”

“Jane The Virgin’s” final season premieres Mar. 27 on the CW.