In the first episode of “Jane the Virgin,” Jane Villanueva discovers that — thanks to an accidental artificial insemination — she’s pregnant. She spends the pilot carefully weighing her options and fielding advice from her mother, boyfriend and the devoutly Catholic grandmother who inspired her decision to remain a virgin until marriage. In the end, Jane decides to have the baby.

On Monday, the show revealed that Jane’s mother, Xiomara, recently made a different choice regarding her own unplanned pregnancy. Xo learned she was pregnant following an ill-advised one-night-stand. Xo had just ended her (rekindled) relationship with Jane’s father, Rogelio, because he wanted to have more children and she was sure she did not. The pregnancy news was one of several shocking developments in last season’s finale, and when Season 3 premiered last week, Xo made it clear that she did not want to have the baby.

This week, “Jane the Virgin” confirmed that Xo had an abortion. There were no lengthy debates about what she should do. We never saw her at the doctor’s office. Instead, when Xiomara told her mother, Alba, that a doctor’s bill was related to the stomach flu she had a few weeks ago, the narrator chimed in: “To clarify, Xo didn’t have a stomach flu a few weeks ago. She had a medication abortion, which caused cramps, which she told her mother was a stomach flu.”

Even as shows such as “Scandal,” “Girls” and “Grey’s Anatomy” have prominently featured abortion story lines in recent years, it’s rare to see such story lines on prime-time television. It’s more common to see a character grapple with an unplanned pregnancy but decide to have the baby anyway. Other shows — including “Grey’s Anatomy” in an earlier episode — see the pregnancy end in miscarriage.

“Jane the Virgin” has discussed abortion a number of times. It was one of the options Jane considered after learning of her seemingly impossible pregnancy, and it came up again when a doctor recommended that Jane allow her amniotic fluid to be tested for a potential irregularity. When Jane first learned she was pregnant, her grandmother confessed that she asked Xo, pregnant with Jane at 16, to get an abortion. “And she said no, thank God,” Alba told her granddaughter in Spanish. “But I carry that shame in my heart every day. Because now, you have become the best part of my life.”

Jane has since had her baby, Mateo, and the show shifted dramatically in Season 2 to offer a realistic and moving portrait of motherhood. Jane, Xiomara and Alba account for three generations of Villanueva women, whose decisions are informed by different experiences and priorities. Xiomara and Alba’s opposing views on sex are a recurring source of tension in the household, which we see in the show’s first flashback when Alba instructs Jane to crumple a white flower in her hand and “try to make it look new again.”

During this week’s episode, Xiomara worried that her mother knew about the abortion and was judging her for it. Eventually, she told her in the most straightforward way possible: “I had an abortion, Mom. And I didn’t know if you knew.” Alba did not take the news well, and she and her daughter had an emotional exchange that led Xiomara to visit Rogelio, who had told her that he’d support any decision she made. “She’s making me feel guilty about not feeling guilty,” Xo told him.

Xiomara’s story was a subplot in an episode that revolved largely around Jane trying to get back into a routine after her husband Michael — who was shot on their wedding night — was cleared to go home from the hospital. “Jane the Virgin” is one of few shows that can adeptly juggle several story lines — some serious, some comical. The scene between Xo and Rogelio was split down the middle because the telenovela star was practicing his “bro” accent in hopes of crossing over to American TV. “Get your mother out of your head,” Rogelio told her. ” If you’re sure about your choice, that’s all that matters. Keep it real, bro.”

Ultimately Xo returned home, where Alba declared that although she didn’t agree with her decision, it was Xo’s decision to make. It wasn’t a particularly sentimental moment, either, just an agreement that they would move on.

And with that, the show moved on to telenovela-worthy subplots such as Petra’s evil twin posing as her sister to blackmail Rafael, and Michael’s recovery, which is going so well that it looks like Jane might finally lose her virginity after all this time.