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.