Something very interesting has happened over the past two weeks in the presidential campaign: Donald Trump has seized the momentum from Hillary Clinton and is climbing back into contention in both national and key swing state polling.

New polls released over the past 24 hours confirm this momentum. In Ohio, Trump leads Clinton by five points in a new Bloomberg Politics poll and a similar five in a CNN poll. In Florida, Trump has a three-point lead on Clinton. In Nevada, Trump has a two-point edge, according to a Monmouth University survey. And in the latest weekly tracking poll from NBC and Survey Monkey, Clinton's national lead has shrunk to just four points. In the RealClearPolitics polling average of all national surveys, Clinton's lead has shrunk to two points over Trump.

How did we get here?

Trump was at an artificially low point in the wake of the Democratic National Convention and his still-baffling decision to spend days in a verbal back and forth with a Gold Star family. Clinton rallied Democrats to her cause at that convention, giving them a reason to be proactively for her. Meanwhile, Trump's battle with the Khan family affirmed the deepest fears of lots of Republican voters — that he was bigoted or, at the very least, playing to some of the darker places in people.

Plenty of Republicans hopped off the Trump train — ahem — in late July and throughout August. But they never really jumped aboard with Clinton; notice that even in Trump's deepest valleys of the last few months, Clinton is barely ever able to crest 48 percent of the vote share.

But with Republican pollster Kellyanne Conway installed as campaign manager in mid-August, Trump began to regulate his behavior — somewhat. He, generally, stuck to his central message — system is broken, Clinton is part of broken system, we need an outsider to fix broken system — and, again generally speaking, stuck to his teleprompter while speaking in front of crowds. Trump and his surrogates also began to highlight the binary nature of the choice before voters in November: If you don't want Clinton, your only viable option is to be for Trump.

Combine that improved messaging with the rapidly approaching Election Day and you get Republican voters rallying behind their party flag. That doesn't mean that many of them who had either been on the fence all along or jumped onto it after Trump's fumbling over the summer are now convinced he would make a great, conservative president. By and large, they still aren't. But presidential elections are the most tribal of votes, and Republicans who spent some time in the wilderness are returning to their tribe's camp — spurred to it by the idea of a Clinton presidency. In a way, what we are seeing in this most unorthodox of races is a return to the polarized normal we've grown used to since the 2000 election ushered it in.

The image of a Clinton presidency — and what that would mean — has been front and center over these past few weeks. From the release of the FBI report produced by the investigation into her private email server to her stumbling incident at a Sept. 11 memorial service over the weekend, Clinton has had a run of bad press. (That's not to mention stories like Aetna pulling out of Obamacare exchanges or President Obama upping the number of Syrian refugees we allow to immigrate to the United States — developments that will confirm for some that Trump's most dire warnings about the future may not be so far-fetched.)

And, as my friend Amy Walter has written smartly, when either of these two candidates has the national spotlight on them, their poll numbers go down. She writes:

At the end of the day, this race feels like one of those movies where escaping prisoners desperately try to stay in the shadows as a huge spotlight arcs across the yard. I’m not implying that either candidate is a jailbird (or deserves to be in jail). It’s really about the spotlight. As we’ve seen throughout this year, the spotlight has not been their friend. When it hits them it exposes their flaws instead of highlighting their strengths. Their poll numbers and their favorability numbers sink.

Never forget that these are the two least popular presidential nominees in modern history. When you are unpopular, the best thing you can do is try not to be in people's faces constantly; it reminds them of what they don't like. As Amy notes, Clinton has been in peoples' faces a lot more of late than Trump.

Now. It's important to note that Trump's momentum in this race has brought him back into contention — not catapulted him into the lead. The electoral map still heavily favors Clinton unless Trump can find a way to make Pennsylvania competitive, a task that has so far proved elusive. Trump still must win states like Ohio, Florida and North Carolina, which, even with his recent surge factored in, remain no better than toss-ups today.

Those are the hard realities Trump faces. Clinton still has — and will continue to have — more paths to the presidency. But, for a candidate and a campaign that looked moribund a month ago, Trump has regained his footing quite nicely and put himself back into serious contention with the first debate approaching. That's pretty impressive.

What Donald Trump is doing on the campaign trail

MANCHESTER, NH - NOVEMBER 7: Republican presidential candidate Donald Trump speaks during a campaign event at SNHU Arena in Manchester, NH on Monday November 07, 2016. (Jabin Botsford/The Washington Post)