Sen. Claire McCaskill meets with farmers and rural residents across Missouri in a "Fighting for our Farmers" barnstorming trip, in Kingsville. Reuters

Democrat Claire McCaskill kept her Missouri Senate seat Tuesday, defeating Republican Rep. Todd Akin, who doomed his campaign with his “legitimate rape” comment.

McCaskill was a highly vulnerable incumbent going into the election and a prime Republican target, as Bloomberg noted. But the race effectively ended in August, thanks to Akin.

According to The Associated Press, McCaskill is the first Democratic senator to be re-elected in Missouri since 1980.

Missouri tends to vote Republican, and CNN currently has Republican candidate Mitt Romney leading President Barack Obama there, 57 percent to 41 percent, with 46 percent of districts reporting.

The Republicans targeted McCaskill's Senate seat and played up her connections to Obama, notes the Los Angeles Times.

But on Aug. 19, Akin defending his hardline anti-abortion line in a television interview, said that pregnancy due to rape was rare. In comments made to KTVI-TV, he said, “If it’s a legitimate rape, the female body has ways to try to shut that whole thing down.”

Leaders of Akin's Republican Party immediately pressured him to quit the race, and Romney issued a statement disagreeing with Akin's comments, reports USA Today. Although Akin issued an apology, the damage was already done.

Akin refused to quit the race and McCaskill was no longer the underdog, gaining momentum and soon overtaking Akin. McCaskill's Senate seat was an important one for Democrats as it could help block the Republicans from gaining a majority in the Senate.