Sen. Rand Paul (Ky.) speaks during the Nov. 10 Republican presidential debate in Milwaukee. (Morry Gash/AP)

The week seemed to be going Sen. Rand Paul's way. He had responded to exclusion from the main stage of the last debate by boycotting it and running through a circuit of friendly media interviews on "The Daily Show" and cable news. He welcomed President Obama's move to bar solitary confinement for juvenile offenders, noting that "[Sen. Cory] Booker and I have strongly advocated for this to happen."  And the campaign estimated that Paul (R-Ky.) had been seen by roughly five times more people than he would have been had he joined the "undercard" debate with Carly Fiorina, Rick Santorum, and Mike Huckabee.

Since then, Paul had marginally moved up in polls, seemingly fitting the criteria for the Jan. 28 debate sponsored by Fox News. The network would only let in "candidates that place in the top six spots nationally, or place within the top five in Iowa or New Hampshire."

Paul, who missed the last debate only because of the late release of the Des Moines Register poll, seemed to have climbed back — by 0.1 of a percentage point over Jeb Bush in an average of Iowa polls. (Bush would qualify for the debate thanks to his fifth place showing in New Hampshire and sixth place showing nationally.)

"An average of the last five polls that fits their criteria we’re in," wrote Paul's campaign manager Chip Englander in an email Monday. "An average of the last five polls on RealClearPolitics, we’re in."

But today, hours before Fox News would announce the lineup, Paul got a problem that the campaign figured it had solved. Jim Gray, the Democratic mayor of Lexington, jumped into the race for Kentucky's U.S. Senate seat, just hours before the deadline.

"Sen. Paul confuses talking with results," Gray said in a campaign launch video. "He offers ideas that will weaken our country at home and aboard. And he puts his own ambitions ahead of Kentucky."

In November, after Republicans won a surprisingly large victory in Kentucky's off-year elections, Paul suggested that he had no serious Democratic opponent. State Auditor Adam Edelen, highly touted by the national party, went down in an upset and announced a hiatus from politics.

"Not only has President Obama destroyed the party in Kentucky, he’s destroyed the bench," Paul crowed in an election night interview with The Washington Post. "The bench that was supposed to rise up and run for office — that’s gone."

Senate Majority Leader Mitch McConnell (R-Ky.), who has kept any concerns about Paul's Senate re-election private, echoed that confidence in a January interview with reporter Sam Youngman. "It looks to me like they can’t find anybody to run," McConnell said.

Yet at that time, Democrats were talking to Gray. The city's first openly gay mayor, he won the first of his two elections by tapping into the wealth built by his family's construction company. While Kentucky had swung hard toward the Republican Party, Gray seemed to give Democrats a shot at something they never had in McConnell's 2014 race — financial parity with the incumbent. Paul, who has raised funds for his presidential and Senate bids simultaneously, entered the year with just $1,415,939 on hand for the latter. By contrast, McConnell had raised more than $30 million to win re-election.

On Tuesday, as Gray hit Paul, the senator used two TV interviews to begin his argument for reelection.

"I’m probably the leading proponent of balancing the budget up here, protecting people’s civil liberties," Paul told Fox News.

"It's hard for a Democrat to run in Kentucky," Paul told CNN. "The last Democratic candidate wouldn't even admit who she voted for. He'll have to admit who he voted for, whether he supports Obamacare, whether he supports the war on coal."

The "last Democratic candidate" was Alison Lundergan Grimes, Kentucky's secretary of state, who was widely derided for refusing to confirm that she'd voted for Obama. Gray, however, had already gotten the question and confirmed his Obama vote — though he didn't "agree with everything he does."

Paul is the only 2016 presidential candidate facing a reelection battle for his current seat this year, and his campaign has already given the Kentucky GOP $250,000 to fund a March 5 caucus — the only way for him to keep seeking the White House without forgoing his Senate race. The Republicans who had wanted Paul to come home may see the Gray candidacy as a reason to raise their voices again.

First, Paul will find out whether he really did make the criteria for Fox News's debate. In a Jan. 21 advisory, the network specified that polling "must be conducted by major nationally and state recognized organizations that use standard methodological techniques."

A close reading of that could knock Paul out, as the last five polls conducted by live callers put both Paul and Bush at 4 percent. While Fox's most recent poll of Iowa put Paul in fifth place at 6 percent, a strict adherence to the average -- depending on how the network judged a tie -- could overrule that.

The network's cutoff for new numbers was 5 p.m. Paul scheduled a media conference call 90 minutes later.

"We think there's no way they can exclude us from the debate," Paul said Tuesday on CNN. "We have a very tall, robust mathematician we're sending over if there's a problem."