It’s rare to find a virgin playing a prominent role on a prime time television series. It’s even more rare to find one who maintains her virginity as an act of faith.

But on the CW’s “Jane the Virgin,” which concludes its first season Monday night, protagonist Jane Villanueva (played by Gina Rodriguez), 23, is a virgin by choice, and thoroughly in command of her Catholic faith despite the temptations around her.

The show launches with an accidental act of artificial insemination that leads to her pregnancy in the pilot episode. (Jane’s nurse confuses Jane with the patient next door, who asks for an artificial insemination of her unsuspecting husband Rafael’s sperm. Complications ensue.)

“But I’ve never had sex!” Jane insists when the doctor informs her that she’s pregnant. (The audience is reminded of this again and again, as “Previously on…” begins the show). Jane stands out across the television landscape — leading female characters like Olivia Pope on “Scandal,” the clones on “Orphan Black” and Carrie Matheson on “Homeland” are routinely portrayed as sexually adventurous.

From the start, “Jane the Virgin” creator Jennie Snyder Urman set out to explore the contrasting religious beliefs at play in the Villanueva household.

“I knew that religion would play a role right from the get-go in that I wanted to have a family that had different levels of religious intensity,” Urman said. “There would be different levels of belief. I wanted to trace how culture goes through those three generations, how religion goes through those three generations.”

Alba, Jane’s grandmother, is the most overtly religious in the family, while Jane’s mother, Xo, is on the skeptical end of the spectrum. Jane falls somewhere in between, and her virginity is in honor of Alba’s beliefs.

Given the prevalence of religion in the news since the arrival of Pope Francis, Urman did her homework before establishing her characters’ beliefs.

“I definitely talked to Catholics about the qualities of belief,” said Urman, who is Jewish. “I read a lot. Especially with the new pope, there was just so much examining of Catholicism and its place in the modern world going on in our society right now. I really tried to think about it in terms of characters and just respect what I wanted them to believe.”

Although virgins rarely appear as a major theme of most television shows, Jane is far from the only woman her age who chooses to wait. The average age of virginity loss in the United States — defined as intercourse between a man and a woman — is 17.1, according to a 2010 study from the U.S. Centers for Disease Control and Prevention. That same study says 80.4 percent of women ages 15 to 44 have had sexual intercourse, which means Jane falls under the other 20 percent.

In order to represent the show’s diverse array of characters respectfully, Urman concentrated on building a diverse writers’ room, including three writers who were Catholic.

“I felt like all of those voices and points of view were important so that we could be specific and not generic,” Urman said. “You’re just trying to build a room with as many points of view as possible. It’s a room full of good, hopeful, optimistic people.”

The show’s narrator says Jane’s passions are, in no particular order, “God, her family and grilled-cheese sandwiches.”

Rather than deflating Jane’s faith, the pregnancy reinvigorates it. She cancels her engagement to longtime boyfriend Michael because she feels more passion for the baby’s biological father, Rafael. She takes stock of her career path, pursuing her passions for teaching and writing. And she does it all without forgetting to care for her mother and grandmother. In short, Jane is defined by much more than her sexual experiences.

“I wanted her to be a virgin but not a prude,” Urman said. “I wanted her to not be ostracized. That one decision does not construct a person. That’s one of many decisions. I wanted to make sure that Jane was always, always very relatable and very sexy, grounded.”

The show presents religion in ways that extend beyond the context of sex, as well. Much of the show’s conflict and emotional power arises out of the generational differences among Jane, her mother and her grandmother. The show displays an unconventional depiction of religion in matriarchal relationships, Libby Hill argues for the AV Club. Hill describes the relationship among the Villanuevas as “agape love,” a Christian affection characterized by charity rather than eroticism.

Faith in the show even extends to the workplace. Jane spends several episodes teaching at a local Catholic school, arousing suspicion among the nuns when she reveals that she is pregnant by artificial means despite never having had sex. The nuns initially balk at the news, but they quickly come around, turning Jane into a quasi-celebrity on campus. The attitude is that the value Jane brings as a bearer of “miracles” exceeds the pitfalls of employing a woman who appears to have violated the terms of the school’s teachings.

“We wanted that to play a little more comically, but ultimately we weren’t going to demonize the nuns too much,” Urman said. “We were going to have somebody not feel great about it, and then ultimately the one nun was going to apologize. You get a little taste of that because it’s a trope in telenovelas, though.”

As a whole, this year’s TV schedule has been noted for its growing popularity for shows with mostly minority casts, from dramas such as “Empire” and “How to Get Away with Murder” to comedies such as “Black-ish” and “Fresh Off the Boat.” With its cast of ethnically diverse actors in nuanced roles, Jane fits neatly into that trend, extending it to include religion, as well. In addition to Jane and her Catholic roots, the show has made nods to Jainism, an Indian faith focused on liberation of the soul.

Rodriguez told the Hollywood Reporter that her own mixed upbringing shows the need for diverse perspectives on television.

“I have Jewish ancestors,” Rodriguez said. “My sister converted to Judaism. I have Christians and Catholics and Buddhists in my family. I have multiracial, multiethnic relationships.” Rodriguez herself identified in an interview with the Sioux City Journal as a “Jew for Jesus, Buddhist, Taoist,” citing a variety of influences.

Shows like Sundance’s “Rectify” and “Friday Night Lights,” which regard characters’ religious beliefs as varied and noble, rather than ignoring them entirely or dismissing them as outlandish, seem to be the exceptions, not the rule. Urman manages to avoid some of the persistent tropes of other celebrated television shows.

“I think there’s so much amazing TV now that’s a lot of antiheroes. I felt like Jane would be a character that would be very interesting but also a good person,” Urman said. “Good people can also be complicated and interesting and compelling and conflicted and make good decisions and bad decisions.”

Mark Lieberman is an intern for The Washington Post.

Want more religion coverage? Follow Acts of Faith on Twitter or sign up for our newsletter.