Ben Boyer can still picture the expression on his wife’s face six years ago, as they talked over dinner at their favorite Italian restaurant in London. It had been four years since Xenia Trejo had been diagnosed, at age 33, with a malignant brain tumor.

But after numerous rounds of treatment, her doctors had just told them that Xenia’s tumor was stable enough to do something she had long dreamed of: pursue a pregnancy. Now Xenia was asking Ben, What do you think? Should we try?

They had always planned to be parents, and now it felt within reach. In that hopeful moment, the reality of their circumstances felt far away.

There are countless parents who don’t live to see their children grow up, but it often involves unforeseen tragedy. The story of Ben and Xenia was different. In the face of a certain ending, they chose to create a beginning.

The number of people who confront this extraordinary convergence of birth and death is small enough that no one knows precisely how many are out there. Yet there are outliers facing terminal illness who have forged ahead with plans to have children. Paul Kalanithi, the neurosurgeon and author of the bestselling, posthumously published memoir “When Breath Becomes Air,” dedicated his book to his daughter, who was conceived after Kalanithi’s metastatic lung cancer diagnosis.

Nora McInerny, host of the podcast “Terrible, Thanks for Asking,” has widely shared her experience of having her son, Ralph, with her late husband, Aaron Purmort, who learned he had brain cancer before they were married.

These are modern stories. For couples who confronted grim diagnoses before the turn of the millennium, the option to preserve their fertility was much harder to find. But the ability to freeze and test embryos improved dramatically in the early 2000s, bringing with it complex existential questions. What would it mean to have a baby in these circumstances for the parent who would die? For the parent who would live? For their child?

Xenia, Ben said, was not inclined to dwell on questions she felt she couldn’t answer. He, however, was initially more hesitant. “I wanted to do whatever she wanted to do, but I also think I played the devil’s advocate more than once — ‘Here’s one possible reality, here’s another possible reality.’ But Xenia’s entire thing was, ‘If I let myself get mired in all the theoretical possibilities, I won’t be able to live a life at all.’ ”

And so they didn’t spend much time trying to decipher an unknowable future. In February 2014, Xenia gave birth to their daughter, Ella. “Xenia would often say, ‘Will Ella remember me, or won’t she remember me? And which is better?’ ” he said.

Ben met Xenia in 2003, when they both worked for the BBC’s Los Angeles office. He was drawn immediately to her warmth, humor and adventurous spirit. Ben remembers one afternoon in the winter of 2007, when they walked home together through falling snow, and he felt a deep sense of belonging: They would be married, have a family, grow old together.

But in 2009, Xenia was struck with a wave of debilitating headaches. A seizure followed, which led to the discovery of the brain tumor. The doctor was shockingly blunt. “He immediately said, ‘So, you know, I assume you understand that you might die within a year,’ ” Ben recalls. “I remember thinking: This can’t be right.”

It wasn’t. Other doctors explained that while the prognosis was terminal, there was no reason to predict such a grim timeline. From the beginning, there were doctors who offered statistics, percentages, who told them how likely she was to still be alive in three years or five. There were also doctors who voiced a more universal truth: We can’t know with certainty what will happen, or when.

Late in 2015, doctors confirmed Xenia’s cancer had begun to advance. Her health continued to decline, and in the fall of 2017, Ben, Xenia and Ella moved in with Xenia’s parents. In those days, Xenia spoke of her sorrow for what she knew was coming. “She would ask if I regretted anything. … I would tell her, ‘This was the best thing of my whole life, that I met you.’ ”

Buried in the digital archives of MetaFilter, an online message board, is a question posed by an anonymous husband in 2010: He explained that his wife had been treated for an aggressive brain tumor, but they desperately wanted to be parents, and he wondered whether having a child was a wise or ethical choice.

The medical community has grappled with this question as well. In 2005, the American Society for Reproductive Medicine convened a group of reproductive biologists, obstetrician-gynecologists, pediatricians and medical ethicists to weigh in. David Ryley, the Boston-based fertility doctor, said the expert panel’s formal conclusion was clear: “The child in question will have a meaningful life even if he or she suffers the misfortune of the early death of one parent. While the impact of early loss of a parent on a child is substantial, many children experience stress and sorrow from economic, social and physical circumstances of their lives.”

“I could get hit by a bus today. How do I judge a couple who wants a child but may suffer misfortune?” Ryley said.

“Reproductive freedom is well established in this country, and this is a personal choice. We have patients seek counseling to help them get through that minefield, to not let them feel judged, to know that the choices they make are in the best interest of their life, their family, their relationship, and to understand that what is important is how they feel.”