RALEIGH, N.C.—It took Kay Hagan 10 minutes to cover everything she wanted to say about public education. The 61-year-old senator had picked the student union here at North Carolina State University to deliver a seminar of her own about all the ways she was building up education and all the ways her opponent Thom Tillis was tearing it down. She left no criticism unmentioned: Tillis, who is speaker of the state House, was even accused of making it more expensive for college students to buy food.

Until a few weeks ago, this was Hagan's secret sauce, the reason her campaign retained a slight lead while Senate Democratic candidates elsewhere wilted during the summer and early fall. The one-term senator had relentlessly focused on education funding in August and September, beating up on her GOP foe's budget-cutting tenure like a boxer determined to methodically wear down her opponent with body blows. For Hagan, keeping the focus of her federal race on a local issue had the benefit of insulating herself from the toxic national atmosphere. As one Hagan adviser joked, "We turned this into a school-board race."

But a smattering of a few dozen students and journalists gathered to listen to Hagan had apparently heard enough. When the senator asked if the students seated in front of her—or the journalists milling behind them—had additional questions about her education agenda, nobody spoke. When an aide then asked the media if they had any questions on other topics, we nearly surrounded her.

Hagan tried to steer the discussion back toward education, but the questions focused elsewhere: Was she hypocritical to complain about outside-group money when some of them were backing her candidacy? Why was she not attending the debate later that night? And had she reversed herself last week when she said she supported a limited travel ban to Ebola-stricken countries?

"From the very, very beginning," Hagan said, "I said a travel ban could be part…"

A reporter cut her off. "Could or should be?"

"You know, I said it could be part of a broader strategy," she continued. "And that's exactly where we are."

Journalists rarely ask the questions politicians want, no matter the situation. But the exchange neatly captured a shifting dynamic in North Carolina: Since the start of October, the issues at the contest's forefront have moved from the local matters preferred by Team Hagan to the national topics, Ebola and ISIS, that have benefitted Republican candidates nationwide. And it's created a sense that Tillis, whose own campaign has become a punching bag for Republicans critical of its efforts, could sneak through to a last-minute victory.

Interviews with nearly a dozen top Republican and Democratic operatives revealed most of them share two basic assessments of the race. For about a six-month stretch starting in April, thanks mostly to her own campaign's superior efforts, just about everything went right for Kay Hagan. And still, she might lose.

"If she loses, it's because of the national environment," said Thomas Mills, a veteran Democratic strategist in the state. "And if Hagan wins, it's because of her campaign."

The terrain has morphed in North Carolina; now it's up to Hagan and her campaign to prove they can hold on to the lead for another 10 days.

* * *

Thom Tillis skips steps when he walks up stairs. He had just left a large room on the first floor of the state GOP headquarters, where he and Republican National Committee Chairman Reince Priebus last Saturday had told a few dozen dedicated supporters that North Carolina was "ground zero" for regaining the Senate majority. The top-ranking state House Republican, now sitting in a second-floor boardroom, explains to me that he normally does mountain-biking to stay in shape but has had to cut back because of the busy-ness of a Senate campaign—hence, the stair-skipping.

The 54-year-old looks like a political operative—fit, with closely trimmed white hair and a sports coat paired with jeans—and he talks like one, too. He's the only Republican candidate in recent memory to declare that he wants to run the National Republican Senatorial Committee, and most who have watched his meteoric rise in the state legislature (he was first elected there in only 2006) describe him as a political animal.

So it's confusing that the story of his campaign would be one of strategic missteps, of struggling to build a cohesive case against his opponent. Only the last-month intrusion of the national political climate has given his candidacy hope.

Tillis himself seemed to acknowledge one of the problems halfway through a stem-winder during Saturday's rally. He had already checked off a list of criticisms that sounded like a summary of everything that's gone wrong for the White House this year: the difficult implementation of Obamacare, scandal at Veterans Administration hospitals, the rise of ISIS in Syria and Iraq, and the arrival of the Ebola virus in Dallas. He eventually meandered into a criticism of the stimulus and Hagan's family members who benefitted from it, before seeming to catch himself.

"I could go on and on," he said. "The problem with Senator Hagan is that there are so many things to talk about that you can almost not get the message out."

Indeed, for months it was hard to tell what Tillis's case against Hagan was, beyond his contention that she was an ally of the unpopular president. It had the feel of a campaign that was reacting to the issue of the day instead of deliberately building a case for months. (The Republican even turned the series of high-profile failures of the Secret Service into an argument that if Obama couldn't protect the White House, he couldn't protect America.)

"People can only absorb so much, so you really have to focus on her failure with jobs and economy, her failure on the safety and security issues," he told me in an interview. "You have so many friends call up and say, 'What about this position or another position?' EPA regulations are another example."

I asked whether he still thinks his criticism of the Secret Service was fair game. "I think it weaves into the narrative of what I consider a crisis of competence," he said. "Whether it's the IRS scandal, Benghazi, NSA, the Secret Service, it just really raises a question about this president's ability to lead."

But since the onset of October, Tillis's kitchen-sink approach has notably left one issue out—education. It wasn't always the case: The GOP campaign had tried to push back on attacks that he had cut education funding and pointed to legislation he passed over the summer to raise teacher pay. But, outgunned by Hagan, one of the cycle's top fundraisers, and Democratic-aligned outside groups, the defense fell flat.

So Tillis moved on. And he did so about the same time the national climate seemed to take hold in North Carolina, giving him free rein to run TV ads about ISIS, Hagan's missed hearings for the Armed Services Committee, and the Centers for Disease Control's Ebola mishaps. For the first time, his campaign was cutting through. He's also benefitted from major investments from outside groups, local stories that put Hagan on the defensive, and a debate this week that Hagan declined to attend—giving the Republican essentially a free hour-long advertisement. The state's particular wariness toward the Republican Party, a problem in legislative races there, has lifted somewhat for the federal race.

"What you're seeing nationally, what you're seeing on the ground, is what people are starting to pick up on," said Jordan Shaw, Tillis's campaign manager. "She delayed a lot of this movement for as long as she could. But now that we've had debates, now that she's been forced to talk about issues other than education, I think you're starting to see the narrative of this race has changed."

Tillis might not have discovered the one defining message of his campaign, but he also might not need one.

Back in the state GOP's boardroom, Tillis is confident the comeback is already underway. "We're moving in the right direction," he said.

* * *

Hagan is visibly shivering when she tells me she's "frustrated" with the president. She's in Asheville, a city embedded in the Appalachian Mountains on the state's western edge, and it's a chilly fall Sunday morning. She's at a small biodiesel production plant for the first stop on a nine-city "message tour" of the state.

"It seems to take a period of time before it's recognized that it's a very important issue that needs more time and attention," Hagan says during a brief interview when I ask how she feels about the president's apparent slow-footed response to the VA scandal and Ebola. It's more a carefully worded slap-on-the wrist than searing indictment, but this close to Election Day, with a liberal base to motivate, it counts as real criticism.

Hagan's campaign doesn't pretend the race's environment hasn't changed or that Obama is anything other than a drag on the ticket. They're just equally convinced that the lasting damage of their education campaign won't dissipate so quickly, and that the campaign's new attack will leave a mark of its own.

The best benefit of Hagan's focus on education might not be the damage it did in and of itself. Instead, it's the luxury it provided the North Carolina Democrat, who was able to save all of her TV ads on abortion rights and contraception access until October. While some Democratic campaigns have beaten that message into the ground since the summer, she's kept those attacks fresh for the home stretch.

"Everybody's got a plan until they get hit in the mouth, but it was always our intention to hold back the speaker's record on women's issues until after we had fully defined his education cuts and tax policies," said one campaign strategist tied to the Hagan campaign. "Each of those exchanges damaged his credibility, making his record of opposing equal pay and defunding Planned Parenthood that much stronger of an indictment."

It's hard to remember now, when Hagan has outperformed not only red-state Democrats like Mark Pryor and Mary Landrieu but blue-state incumbents like Mark Udall, that she was once seen as one of the party's weakest candidates. She didn't have the famous last name like Pryor or Landrieu, and her poll numbers tumbled during the winter when Americans for Prosperity launched a multimillion-dollar TV ad blitz.

She did just about everything right since then.

"For her to win, she had to run a perfect campaign," Mills said. "And she's run a damn near perfect campaign."

For months, polls showed Hagan with a slight lead in a three-way race that included the Libertarian candidate, Sean Haugh. Two recent surveys showed Tillis gaining ground, even holding a slight lead, and one Republican strategist tracking local races says he's seen a bump in Tillis support. But Democrats are adamant that Hagan's numbers haven't dipped, and there's been a notable absence of quality polling in North Carolina.

Remarkably, both campaigns generally agree about how the race has shaped up thus far: Tillis's popularity took a dive during the summer's legislative session, Hagan's education-focused message consumed the months of August and September, Tillis was smart to stop responding to those attacks, national issues have taken hold of the conversation in October, and the race is very close.

They just disagree on one thing: Is the environment or Hagan's campaign going to win out in the end?