Matt Bevin, the Republican nominee in the Kentucky governor's race, wasn't a very good candidate.  By all accounts, he was standoffish and ill at ease on the campaign trail, and inconsistent — to put it nicely — when it came to policy.  The Republican Governors Association, frustrated with Bevin and his campaign, pulled its advertising from the state.  Polling done in the runup to today's vote showed Bevin trailing state Attorney General Jack Conway (D).

And yet, Bevin won going away on Tuesday night. How? Two words: Barack Obama.

Obama is deeply unpopular in Kentucky. He won under 38 percent of the vote in the Bluegrass State in 2012 after taking 41 percent in 2008. In the 2012 Democratic primary, "uncommitted" took 42 percent of the vote against the unchallenged Obama. One Republican close to the Kentucky gubernatorial race said that polling done in the final days put Obama's unpopularity at 70 percent.

So, when the RGA returned to Kentucky for the final two weeks with $1 million worth of ads, you can guess who was prominently featured.

Yup! President Obama. And, in particular, his famous/infamous comments about his policies being on the ballot during an October 2014 economic speech at Northwestern.  Here are the key 28 words from Obama: "I am not on the ballot this fall. Michelle’s pretty happy about that. But make no mistake: these policies are on the ballot. Every single one of them."

Republicans clubbed Democrats in swing and GOP-leaning states with Obama's comments in the 2014 midterms. So, why not repeat the same blueprint a year later?

"Our families can't afford four more years of the liberal policies of President Obama and career politicians like Jack Conway," the ad's narrator says as ominous pictures of the two men are shown on the screen. "Can you really trust Obama and Conway to make things better?"

Ouch. And damn effective.

Now, it wasn't solely Obama's popularity that cost Conway on Tuesday night. "Conway was the anchor around Conway," said one Democratic strategist familiar with the polling in the contest. "In many ways Conway is the [former Massachusetts state attorney general] Martha Coakley of Kentucky. There's just something about him that voters simply don’t want to vote for."

(Conway has now lost a House race, a Senate race and a governor's race in the state over the past 13 years. Coakley, the once popular top cop in the Bay State, lost a seemingly sure-thing Senate special election in 2010 and the governor's race in 2014.)

Conway might not be Kentucky's cup of tea. But, Bevin, from his odd and less-than-promised primary challenge to Sen. Mitch McConnell (R) in 2014 all the way through his surprise primary win in this race and rough-around-the-edges general election campaign was far from the ideal GOP candidate either.

The difference? Conway had a "D" after his name — just like President Obama. And, in a state like Kentucky, that appears to be more than enough.