The birth control pill is undoubtedly one of the greatest inventions of the 20th century. While its ability to give women reproductive control and sexual freedom sparked a sexual revolution, this control and freedom might come with a cost we’re just beginning to understand. It turns out that the pill changes the kind of men women are attracted to—and these changes may lead to women settling down with men they’re not that into.

Let’s review the biology: A woman’s body naturally undergoes a cycle each month in which it prepares for the possibility of pregnancy. During this time, dramatic hormonal changes take place, especially during ovulation, when eggs are released. Birth control pills regulate women’s hormone levels to prevent the big swings that trigger ovulation.

As it turns out, the hormonal fluctuations occurring around ovulation seem to change the kind of men women are drawn to. Specifically, when women enter the most fertile part of their cycle, they tend to find masculine men more sexually attractive—think men like James Bond, who are both manly-looking and display dominant behaviors.

Researchers observed that women were more likely to flirt with “bad boys” during ovulation than with “nice guys.”

There’s a lot of evidence supporting the theory of ovulatory shifts in attraction, such as this 2014 paper that reviewed 50 scientific studies on the topic. Other studies have provided additional support since then, including a fascinating one in which researchers observed that women were more likely to flirt with “bad boys” during ovulation than with “nice guys.”

So, what’s going on here? Scientists are pointing to evolution. They argue that, over time, women evolved to be more attracted to masculine men when their odds of getting pregnant are highest because masculine features are a sign of good health and genetic fitness. To the extent that masculine guys have better odds of fathering children who will survive and women have a vested interest in having the healthiest babies possible, a shift in attraction toward manlier men during peak fertility only seems logical.

Thus, when birth control pills wipe out women’s regular hormone swings, they tend to have a more stable pattern of attraction. They don’t show the same shifts toward masculinity that women on their natural cycles do. The result is that women who are and aren’t on the pill might end up having sex with and starting relationships with very different kinds of men.

This difference in partner selection can become a big deal down the road if and when a woman eventually stops using the pill. When this happens, she’ll start to experience shifts in attraction that could potentially make her feel differently about her chosen partner. For example, a 2014 study that looked at women who stopped using the pill after they had begun a relationship revealed that these women were less sexually satisfied than women who had been consistent users or non-users of the pill for the entire history of a relationship.

We don’t know much yet about whether there are consequences beyond sexual satisfaction, but it’s reasonable to think that there could be more serious implications. Imagine a woman on the pill who marries a guy that isn’t particularly masculine looking. She then stops using the pill, starts experiencing shifts in attraction toward rougher guys and finds she isn’t as satisfied with her sex life. These factors might increase her odds of cheating.

Research suggests the likelihood of this scenario: the women who are most likely to display sexual interest in other men during ovulation are the same women who rate their current partner as low in masculinity.

If these results tell us anything, it’s that sexual desire is a complex product of evolution, biology, and culture. Simply put, we still have a lot to learn about what attracts us to other people—and them to us.

Justin Lehmiller, PhD is a sex educator and researcher at Ball State University and author of the blog Sex and Psychology. Follow him on Twitter @JustinLehmiller.