Liberals had a lot to celebrate last night. President Obama was handed a second term while Democrats held the Senate—both feats that seemed far from certain earlier this year. When we look for people to thank for these victories, we have to give blatant Republican misogyny a big round of applause.

Two Senate seats that were at one time safe bets for the GOP rested in Democratic hands at the end of the night thanks in large part to Republicans trying to define rape. Claire McCaskill defeated her challenger Todd Akin—women voters had a way of shutting that whole thing down after he made some outrageous comments about birth from rape. Richard Mourdock, who also brought up rape in a bizarre fashion, had to concede last night, another race the GOP expected to win. While Joe Donnelly, who defeated Mourdock, is no pro-choice treasure—he signed on to the GOP House bill that made reference to “forcible” rape, for instance—women at least sent Mourdock packing.

These two races have much in common. As Celinda Lake, Democratic pollster and president of Lake Research Partners, put it to me, “It was very much women who won those races and women reacting to the comments made by the Republican candidates about redefining rape.” In fact, exit polling showed McCaskilll carrying more of the female vote than she did in 2006, overwhelmingly winning votes from women ages 18–44. Polling for the Donnelly/Mourdock showed the same phenomenon: 52 percent of women voters picked Donnelly versus 42 who went for his opponent, while the candidates were deadlocked with male voters.

These dynamics showed up in some other races. Bob Casey remains Pennsylvania’s senator, defeating Republican Tom Smith, who compared pregnancy from rape to having a child out of wedlock, with 58 percent of women’s votes. Heidi Heitkamp, a Democrat running for Senate in North Dakota, has a slight lead over Republican Rick Berg, who only supports abortion exceptions for the life of the mother and not for rape victims, although the race is still too close to call.

And it may have been Akin’s headline-worthy comments that began to turn the tide in the Democrats’ favor. His remarks were made on August 19, and as you can see in the chart below (via Brian Beutler of Talking Points Memo), that’s when the GOP’s chances of taking the Senate began to disappear:

This difference of opinion between male and female voters also made a big appearance, of course, in the presidential race. Women turned out at the same rate as 2008—they made up 53 percent of the electorate. CNN’s exit polling showed a ten-point gender gap, with 54 percent of women going for Obama and just 44 percent voting Romney. According to Lake, the two issues that account for this gap were a strong feeling among women that Obama, and Democrats in general, have economic solutions that are “more in touch with their lives,” and that female voters were paying attention to women’s issues, particularly the GOP threat to defund Planned Parenthood. That last issue “remained one of the most vivid things to women, one of the pieces in advertising that had the highest recall,” Lake told me. It looks like having candidates at the top of the ticket who want to overturn Roe v. Wade, undo the ACA's provision giving women co-pay free access to contraception on "day one," and defund Planned Parenthood doesn't play well with one of the country's largest voting blocs.

And while the economy remained at the front of women’s minds as they headed to the polls—six in ten voters said that was the top issue—abortion and contraception are inextricably intertwined with that concern. “Reproductive health issues, whether funding for Planned Parenthood or insurance covering birth control, is an economic issue as well as a women’s health issue, particularly in this economy,” Lake said. Women were thinking, “Why are we even discussing this? It’s not like there’s a shortage of other issues.” Sky-high unemployment and stagnating wages might deserve some attention, for instance.

So thank you, Republican misogynists, for handing the Democrats crucial victories last night. The comments about women this cycle were not an abrupt departure from the party’s ideology but rather moments of clarity about what they’ve felt deep in their hearts for years now, as pro-choice women have long been warning. But the GOP overreached in exposing its sexism and misogyny this year. Whether it was a strategy to rally up the ultraconservative base or merely moments of accidental truth-telling, it backfired in a major way. Score one for women’s rights, zero for attempts to control their bodies.

John Nichols: Obama won big last night. Now is the time for him to do something with it.