Image copyright Getty Images Image caption Donald Trump with Wisconsin Governor (and briefly a primary opponent) Scott Walker

Back when this presidential campaign started what seems like a lifetime ago, there was ample speculation that an unconventional candidate like Donald Trump could shake up the electoral playing field.

Maybe his anti-trade rhetoric could put large swathes of the Midwest in play. Maybe he could be competitive in his home state of New York, or with the white, working-class portions of New England.

The wild-eyed optimists even cast furtive glances at blue-state bastion California.

Instead, as the months passed, the race appeared to be boiling down to the same old battleground states that had dominated recent contests - Ohio, Florida, New Hampshire, North Carolina and Pennsylvania.

Virginia and Colorado moved a little more firmly into Hillary Clinton's camp, while Iowa tilted Republican.

So what, exactly, was Mr Trump doing in Eau Claire, Wisconsin, on Tuesday night? And why on earth was he in thought-to-be-firmly-blue Michigan and New Mexico earlier in the week?

Call it his Blue State Gambit. A last-minute push to see if Mrs Clinton is weak in any of her supposedly "safe states". Or maybe it's better termed a spaghetti-against-the-wall strategy - throwing everything out there, and seeing what sticks.

The electoral map presents a cold, hard reality that the Trump team surely recognises.

For more election analysis, follow Anthony on Twitter

Image caption What Clinton's "firewall" looks like

If you give the Republican every consensus toss-up state on the map right now - Ohio, Florida, North Carolina, Nevada, Iowa, Arizona and half of Maine, that only gets Mr Trump to 268 electoral votes - two shy of the 270 necessary to put him in the White House.

That's the "Clinton firewall" staring Mr Trump in the face. He either has to win Pennsylvania or New Hampshire - which haven't budged from Mrs Clinton's column despite heavy efforts on both sides - or find a new way around the electoral blockade.

And so the Trump campaign is unrolling a $25m television advertising campaign that includes Wisconsin, New Mexico and Michigan. And the man himself travelled to western Wisconsin for the first time since April, giving a closing-argument stump speech to a packed crowd of around 3,000, with at least 1,000 more left outside.

He offered the usual condemnations of "crooked" Hillary Clinton, along with blistering attacks on Obamacare and current US trade policy.

In a new twist, he ended on an optimistic note - the kind of positive pitch that might play well with the disaffected Democrats and political independents who could help him carry purportedly pro-Clinton "blue" states.

"All we have to do is stop believing in our failed politicians and start believing in each other and our great country," he told the cheering crowd.

Media playback is unsupported on your device Media caption How did we end up with two such unpopular candidates?

More from BBC News

"There is no dream out of our reach. Don't let anyone tell you it can't be done. The future lies with the dreamers, not the cynics."

If Mr Trump sounded re-energised, it was because just over a week ago, pundits and prognosticators were writing his campaign's epitaph.

He was sagging in the polls, and talk turned to how many congressional candidates he would drag down with him.

That was before a week of good news (or rather, bad news for Mrs Clinton). Some Obamacare-managed health insurance rates were going up, her campaign was beset by more embarrassing hacked emails and, the week's capstone, FBI Director James Comey sent his cryptic letter to Congress about a renewed investigation into the Democrat's private email server.

Now, if polls are to be trusted, the Trump campaign is showing signs of life. He's narrowing the gap in major national preference surveys and has pulled ahead in several of battleground state polls.

Image copyright Getty Images Image caption Waiting for Donald Trump at the Wisconsin rally - cheesehead and all

In Eau Claire, Mr Trump shared the stage with a who's who of Wisconsin politicians - Governor Scott Walker, Senator Ron Johnson (who is in a tight re-election race against former Senator Russ Feingold), Congressman Sean Duffy and Republican Party Chair Reince Priebus.

That should just about end talk of the Republican establishment turning its back on their presidential nominee in the dying days of the campaign.

It's looking more and more like the election is going to go down to the wire.

Although the latest Wisconsin poll shows Mrs Clinton with a six-point lead, outside the arena in Eau Claire Mr Trump's supporters were practically bubbling over with the possibility that Wisconsin could be in play.

"I think there's a lot more support than maybe we've probably been seeing," said Shannon Olson, who came to the rally with his young son, both wearing Trump-esque dark suit and red ties.

Mr Olson said Mr Walker's multiple victories in the state's gubernatorial races were evidence that Mr Trump could carry Wisconsin next week.

"There are Republican voters here," he said. "And in an important election, we may see a different turnout this time."

He added that Mr Trump's talk about trade and bringing back manufacturing jobs would appeal to Wisconsin voters.

On the other side of a police cordon from the rally-goers, Beth Mule - one of about 50 anti-Trump protesters - painted a different picture.

"Scott Walker is an aberration," she said. "People are going to come to their senses, and I think we'll prevail on election day."

As she stared across at the Trump faithful streaming into the arena, she hoisted a sign over her head that read: "Some of you can't help it, but many of you should know better!"

A few yards away, Steve Unmus - another local schoolteacher - was a bit more cautious. He said that if Mr Trump was relying on Wisconsin, which hasn't been won by a Republican presidential candidate since 1984, as part of his path to the White House, he's in trouble.

"But ..." he added, followed by a long pause.

"Friday kind of freaked me out," he said, referring to the re-emergence of the Clinton emails story. "It's going to be close."

Is he worried?

"I've been nervous for about a year now," he said. "Literally."