RALEIGH, North Carolina (CNN) -

The state Democratic Party here is consumed with an ongoing sexual harassment scandal. The embattled governor is so unpopular she decided not to run for a second term. And supporters of same-sex marriage were dealt a crushing defeat at the ballot box last week.

But the biggest challenge in North Carolina this year for President Barack Obama and his fellow Democrats can be boiled down to something simpler: math.

Everything that could have gone right for Obama in 2008 did go right, and yet he still only won North Carolina by just 14,177 votes -- a tiny sliver of the 4.2 million cast statewide.

Thanks to his campaign's striking ability to expand the Democratic electorate, Obama even managed to win the state while losing independents to John McCain.

Volunteers blitzed college campuses and dominated the early voting game. New African-American voters were registered in huge numbers. Obama also performed better among white voters than both John Kerry and Al Gore. Crucially, Republican turnout fell off dramatically from 2004.

Obama world read the victory as a promising sign of Democratic realignment in the South and rewarded the Tar Heel State with the Democratic National Convention, which will take place in Charlotte in September.

Today, though, it's hard to find a Democrat in the capital of Raleigh who believes the president, saddled with the burdens of governing and a sputtering economy, can stir the enthusiasm of 2008 and repeat his near-flawless North Carolina performance.

"My heart says he will win here, but my head says it's going to be awfully tough for him," said Gary Pearce, a longtime Democratic consultant and adviser to former Gov. Jim Hunt. "This is a tight state for him. Race is part of it. The economy is a big problem. Four years ago he was new, he was exciting. He was hope and change. That has worn off now. The glow is gone. It's going to be tough for him to catch magic in the bottle again."

Obama's fading luster has put enormous pressure on his team not only to mobilize the existing Democratic base but also to find new voters.

The president's path to victory becomes even narrower if Republican turnout grows from the dismal 31% showing of 2008 -- a certainty according to political operatives in Raleigh who watched in 2010 as a fired-up GOP captured both houses of the state Legislature for the first time since Reconstruction.

North Carolina is fast becoming a proving ground for advisers to Obama and Mitt Romney, who stress that the presidential race will be decided by the slimmest of margins in a handful of states.

Turning out voters is key

"The election is going to be won by the candidate who gets their voters to the polls," said state Rep. Alma Adams, a Democrat from Greensboro and the chairwoman of the Legislative Black Caucus. "That's where the election is going to be determined. We need to focus on the people who are registered to vote and get them active and participating in the process."

A popular talking point among Republicans here involves the celebrated "youth vote" of 2008, a key part of the Obama coalition.

The share of voters under 30 was the same in North Carolina as it was nationally.

But thanks in large part to the stout organizational efforts of the Obama campaign on more than 100 college campuses across the state, voters between 18 and 29 chose Obama over McCain by a stunning 74%-26% margin.

If that split more closely resembled the youth vote nationwide -- 66% for Obama and 32% for McCain -- roughly 60,000 North Carolina votes would have swung to McCain, handing him the state and its 15 electoral votes.

Even the slightest shifts in turnout can determine the race, a prospect relished by Republicans, who were hamstrung in the last election by dampened conservative enthusiasm and a superior Democratic ground game.

"McCain did very little in North Carolina, and Obama did everything," said Dee Stewart, a Republican strategist in Raleigh. "The McCain campaign's presence was minimal at best. While that was happening, the Obama campaign was knocking on the doors, not only of swing voters but of solid Republican voters."

The Romney campaign recently moved a state director to Raleigh and is piggybacking off the early joint efforts of the North Carolina GOP and the Republican National Committee, which have opened four field offices so far.

Outsourcing of jobs could be problem for Romney

Romney, though, has his own challenges to overcome.

The Obama campaign has painted the former Bain Capital executive as a corporate raider who shut down factories for the sake of a profit, a message they are pushing aggressively in a state racked by the outsourcing of textile and furniture manufacturing jobs.

To win statewide in North Carolina, Republicans must sway evangelicals and "Jessecrats" -- those white cultural conservatives loyal to the late Sen. Jesse Helms -- in the eastern part of the state.

But the former Massachusetts governor struggled to rally conservatives throughout the Republican primaries, particularly in the South.