Since I live in Montana, this is one of this year's elections that I know a bit about: the race between Jon Tester and Dennis Rehberg for Senator.
Much like Claire McCaskill in Missouri, Jon Tester won office in the wave election of 2006, defeating incumbent senator Conrad Burns by a thin margin. While Jon Tester's appearance and background (crew cut with a missing finger from a farming accident) were well-suited for Montana, he was a liberal Senator in a conservative state. It seemed that the election of 2012, when there was still much opposition to the Obama administration, would be a good time to unseat Tester. The candidate chosen was Dennis Rehberg. Since Montana only has one congressional district, Rehberg had already won statewide office many times.
The 2012 cycle has not, overall, been a conceptual and idealistic year. Dennis Rehberg attacked Tester for being a lackey of the Obama administration and being corrupted by "Washington politics". Tester counterattacked that Rehberg wanted tax breaks for millionaires, an end to social security, and a decrease in Pell Grants. I have been witnessing banner ads cross my browser for months on this subject. Apparently, Tester's kitchen table appeal won out over Rehberg's identity politics, because Tester was elected with a narrow plurality, winning 49-45, with Libertarian Dan Cox winning a respectable 6.5% of the vote.
Something that might be confusing to people unfamiliar with the United States political system is how candidates with similar positions can have different results. If the people of Montana handed Obama a 13 point loss, why did they hand Tester, with many of the same political positions, a 4 point victory? And if the people of Montana had voted Rehberg in by large margins as a congressperson, why did they vote against him as a Senator? And the answer to this is partially incumbency and inertia, part identity politics, and partly "I don't know".
Jon Tester holding his senate seat was the last competitive race of the night, and guaranteed a net gain of two seats for the Democratic Party in the Senate.