The affair started when her marriage was already falling apart.

The decision to cheat was the culmination of several unhappy years of marriage, according to 36-year-old Jessica Lawrence. But the problem started long before, when she dated and soon broke up with her college boyfriend because he was seeing other women. They reconnected a few years after graduation and had a life-changing dinner date. Knowing what she knew, Lawrence says she “set herself up for failure,” but when he kissed her on the forehead, she had a “profound ‘this is the man I’m supposed to be with’ moment and got wrapped up in that fantasy.”

Lawrence and her now ex-husband married in 2008 and divorced in 2015. In the intervening years of marriage, they would live out the fantasy — buying a house, taking trips, having a child. But they would also live out a reality in which he would have multiple affairs, and she would have an affair of her own, after which the couple would try and fail to make their marriage work.

Theirs is just one story of many: An estimated 15 to 25 percent of married, heterosexual couples experience infidelity, and no two stories or outcomes are the same. Many couples will call it quits in the aftermath, as evidenced by the fact that cheating is a common underlying factor in the 40 to 50 percent of marriages that end in divorce.

Statistics on all aspects of infidelity — from how often it occurs to who is doing the cheating — among both heterosexual and non-heterosexual couples tend to be hard to pin down, in part because people may not tell the truth to researchers. In the realm of heterosexual relationships, some studies have found that men cheat at slightly higher rates. Others report that men and women are on par. Celebrated psychotherapist and author Esther Perel, for one, has suggested that, while women are cheating more and more, the rate of men cheating has stayed flat. If you include emotional affairs, which do not involve sexual contact but can be just as devastating to a relationship, cheating rates increase vastly for both sexes.

These statistics are in contrast to what we often see in the media, where there’s a steady stream of real and fictional women standing by their men in the wake of infidelity — think Beyoncé and Jay-Z, Miranda on “Sex and the City” and too many women to name on the 1960s-era show “Mad Men.” But the idea that men are wired to cheat more often than women is a “false narrative,” according to Christin Munsch, a sociologist at the University of Connecticut.

One recent study based on data from the General Social Survey even suggests that women ages 18 to 29 are slightly more likely to cheat than men in the same age group. “While data suggests that men have cheated more than women, longitudinally we see that the rates are converging, likely because women have more opportunity than they had in the past,” Munsch says.

Despite the theory that straying is common and becoming more equal between genders, a recent Gallup poll on moral acceptability found that the vast majority of Americans believe infidelity is the least moral behavior among numerous controversial issues — including abortion and polygamy. This wasn’t always the case, but infidelity has lost social acceptance over time while divorce has become more accepted.

Munsch says the cultural shift is likely tied to greater expectations of marriage combined with the growing acceptance of divorce. Whereas marriage used to be more rooted in practicality and social pressures, today, people wait longer to get married “because they’re waiting for the perfect person who ‘completes’ them,” she says.

In other words, as people have come to expect more from their long-term relationships, “they’ve also become less forgiving of transgressions,” says Jenny van Hooff, a sociologist at Manchester Metropolitan University.

Relatedly, our culture frowns upon partners who remain in the relationships after the fact. In October, former Democratic presidential nominee Hillary Clinton said the gutsiest thing she’s ever done is stay in her marriage to former president Bill Clinton. Given the very public nature of her husband’s cheating, that decision — while not rare — was likely very difficult. Beyoncé walked in similar shoes, and a quick online search gives a sense of how the masses judged.

Part of that judgment, van Hooff says, may link back to those high expectations for our relationships. It’s also true that people are quick to judge when they haven’t experienced something themselves. Munsch agrees:

“When you ask, hypothetically, ‘What would you do if your partner cheated,’ women say across the board that they would leave in a heartbeat, though that is not necessarily predictive of actual behavior.”

Given the fact that fewer women need to stay in marriages for financial security, and that divorce is more socially acceptable, the answers as to why people stay with straying partners are complex.

For Elise, who requested to use only her first name to speak candidly about the details of her relationship, that decision came down to a realization that her marriage was worth fighting for. She’d had an inkling for a while that her husband had been having an affair, but was busy enough with work and two young kids, one of whom has special needs, that she never confronted it. Then, five years into their marriage, her husband confessed to having a long-term extramarital relationship. “The sadness, shock and betrayal were so profound, and I just couldn’t believe it,” Elise says. “I felt so stupid and humiliated.”

Elise’s first instinct was divorce, and she spoke with an attorney. But, eventually, her stance softened, even as she took steps to protect her financial stability by providing her lawyer with bank statements, investment records and other documents in case she decided to file for divorce.

Elise says that a turning point came when she realized that no one would ever love her special-needs child the way she does; she felt she owed it to herself, and her kids, to try to keep her marriage and family unit together.

According to “Healing from Infidelity” author Michele Weiner-Davis, kids are one of many factors why couples stay together. “It is an act of courage to say, ‘even though I’ve been hurt, there are lots of reasons to work through it,’” she says. Other reasons include a shared history and invested time, common goals, compatibility and — as counterintuitive as it may seem — deep love and affection. Weiner-Davis, who has counseled thousands of couples dealing with infidelity, says that it is “simply not the case” that affairs only happen in “bad” marriages.

“People have affairs even when they have a good sex life and feel connected to their partners,” she says. While she in no way recommends infidelity, when it does happen, Weiner-Davis views it as an opportunity to “look under the hood” to see how the straying partner needs to change and dig into how the couple interacts in order to strengthen the relationship moving forward. By definition, reconciliation requires two willing partners, so if either spouse opts out of the process, divorce is likely.

Given that both Elise and her husband were willing to try and reconcile, her effort involved couples’ therapy, individual therapy for both her and her husband and a coaching session with another woman who had “survived” infidelity.

“I felt like some of my friends were thinking, ‘What the hell is wrong with you?’” Elise says.

“You can’t really go to them and ask how their infidelity is going like it’s menstrual cramps.”

Therapy led to both personal and relationship insights that enabled Elise to understand how her husband could have sought attention elsewhere. At the same time, she says, she did not let him off the hook for making damaging choices.

“I learned that he was very insecure and needs a lot of verbal and physical affirmation,” Elise says. Filling that need did not come naturally to her — a situation Perel, the psychotherapist, describes as very common. In other words, Elise’s husband was getting built up by someone else. As Elise puts it, “If you’re not getting what you need at home and someone else is offering attention, then you might take it.”

That empathy is critical in forgiveness — a key component of affair recovery, according to experts and partners who have gotten through it.

“Forgiveness was imperative, because I knew if I didn’t, it would keep me from moving forward,” Elise says. “For a while, it was a daily process of writing in my journal and thinking about it every single day, but I eventually came to a point where I looked back with forgiveness and kind of felt like Mother Theresa.”

Now, almost 10 years later, Elise says she feels “ballsy.”

While divorce would have been hard, it was much harder for her to look at herself and the layers and dynamics of her marriage, she says.

“I would say I’m fundamentally the same, but our marriage is different and better because of the changes we both made,” Elise says. “I don’t think my husband or I would go back, but we are happier and stronger and better than we were when all of this came out.”

Munsch says one of the greatest predictors of infidelity is simply “opportunity,” and with the rise of the Internet, opportunities abound.

Researcher Alicia Walker recently looked into how and why a very specific group of women chose to cheat online, and published findings in her 2017 book “The Secret Life of the Cheating Wife: Power, Pragmatism, and Pleasure in Women’s Infidelity.”

Over the course of a year, Walker interviewed 46 women who had all set up accounts on Ashley Madison — a website specifically intended for facilitating affairs — with the sole purpose of finding a cheating partner who met their sexual needs. Although her sample was fairly small, Walker says her research suggests that “motive doesn’t vary much by gender, and you can find just as many women as men who cheat for sexual pleasure, revenge, attention,” among other reasons.

While it should be said that most affairs are only tangentially related to unsatisfying sex, Walker says many of the women in her study believed their affairs would save their sexless or sexually unsatisfying marriages. The vast majority said that, aside from not getting their sexual needs met, they felt they had pretty good lives with good men.

“It came down to a moment when they felt they would either have to blow up their lives and break someone’s heart, or cheat to stay,” she says.

Of note is that none of the handful of women in Walker’s study whose spouses eventually found out about their affairs remain married. “Generally speaking, when looking at overall data, men tend to leave if their spouse has cheated — though not all of them,” Walker says. We can’t know exactly why the couples in Walker’s study divorced, but it could go back to primal concerns men may have over sexual selection, as one recent study suggests.

Weiner-Davis says that difference is not borne out in her practice, however. Although her experience may be skewed because she only counsels couples trying to reconcile, she says that the men she sees seem to be willing to move past their partners’ affairs more quickly than the women.

Of course, not all marriages can or should be saved after infidelity, says Janis Abrahms Spring, therapist and author of “After the Affair.” While some people “learn the lessons of the affair” and go on to rebuild solid marriages, others do not, she says: “Some people don’t learn lessons and continue having affairs and betraying the other person, and then the hurt party needs to ask why they are taking the person back.”

Such was the case with Lawrence, the woman who chose to cheat on her husband after enduring his numerous affairs.

She says her spouse’s cheating started when he returned to graduate school a few years into their marriage. “I had a sense that things weren’t right because he ignored me, wasn’t as nice as he should have been and was very dismissive,” she says. Eventually, Lawrence started checking his phone and found what she thought was proof of multiple affairs. Her husband, she says, trivialized the messages.

At first, she felt “caught up in what I would lose,” so she suppressed her concerns and stayed in the marriage.

“I never felt trapped and knew I had options, but desperately wanted it to work and didn’t want to be single and with a child at 33 years old,” she says.

But living in what she describes as a “sham” marriage led to Lawrence’s own affair, a common scenario with women who cheat. While there is little data on whether men or women are more likely to opt for dissolution when they are the cheating partner, Munsch theorizes that, because women tend to have more emotional affairs while men tend to stray strictly for sex, women are more likely to want a divorce. “They’ve already mourned their marriage and may be using [the affair] as an exit strategy,” she says.

Lawrence chose to have an affair with a man who she felt loved her for who she was. “I knew it was wrong but couldn’t help but gravitate toward something that felt so good,” she says.

After the relationship was exposed to her husband, the affair ended badly, she says. Although the couple stayed together for a few more months, Lawrence got an attorney when she learned that her husband was having another affair. After six years of marriage and within a year of her infidelity, Lawrence filed for divorce. It’s a choice she never imagined, but doesn’t regret. “I am in a much better state mentally now, and I don’t walk on eggshells or live in fear that he’s cheating,” she says.

Ultimately, infidelity is difficult to quantify and qualify because of the obvious taboos and every relationship’s unique circumstances. There’s even less research into non-heterosexual infidelity; one small study found that heterosexual men and women — and particularly women — find infidelity more emotionally distressing than do gay and lesbian individuals.

One thing is true: Many women find themselves experiencing infidelity, whether they are the betrayed or the betrayer. But social stigma keeps a lot of them from talking about it.

In the end, Walker says, communication may be the crux of the issue in instances of infidelity. She says the biggest takeaway from her research is that couples need to have more conversations before reaching the tipping point. The women in her sample “talk about having very frank conversations with their affair partners, and they didn’t have those kinds of conversations before getting married or moving in together and maybe we should,” she says. “Love won’t conquer all.”

Lily Lines: There are fewer ‘marriageable men.’ Here’s why.

Plus, Planned Parenthood says it will expand its app to all 50 states

We should celebrate the Knot and Pinterest’s decision to stop promoting plantation weddings. But that doesn’t let couples off the hook.

The companies are moving a critical dialogue into the mainstream. Now it’s up to consumers to act.