After a heady spring and summer that saw New Democrats win power in Alberta and then surge to first place in national polls, last night's results are a bitter disappointment to the party.
The NDP peaked early, then went into a steady decline, hemorrhaging support in the last few days as strategic voters who had been sitting on the fence flocked to the party that appeared best placed to beat Stephen Harper.
And so each poll showing Liberal momentum became a self-fulfilling prophecy.
But the Liberals didn't only win by luring defectors from the NDP. They also energized new voters. For every vote the NDP lost between 2011 and 2015, the Liberals gained four. And so the party must also ask itself: Why couldn't New Democrats inspire such a wave of first-time voters?
In the end, the New Democrats were collateral damage, rather than prime targets, in the Canadian electorate's powerful rejection of Harper. But that is small consolation for the defeat of such high-profile MPs as deputy leader Megan Leslie, foreign affairs critic Paul Dewar, defence critic Jack Harris and veterans affairs critic Peter Stoffer, all experienced parliamentarians and good constituency MPs who were considered safe when the campaign began.
Shawn Dearn, the party's director of communications, issued a statement on the loss: "We're disappointed, of course, but do congratulate Mr. Trudeau's campaign. As you know, we lost some great MPs, but this election was about defeating the Conservatives, so we are pleased with that. Bittersweet, I guess. But, now we get back to work."
The first task must be to figure out what went wrong.
Boldness pays off
In this campaign, bold and even reckless moves were consistently rewarded with success, while caution was punished.
The NDP itself was the first to demonstrate that, by standing up to oppose the Harper government's anti-terrorism Bill C-51, which at first appeared popular with a Canadian public shocked and scared by the attacks of last October.
No pollster or political consultant would have counselled the move at such a time. And yet as experts stepped forward to warn that the bill threatened basic freedoms, and public opinion began to shift, the NDP never had cause to regret its principled opposition. Instead, it was the Liberals who would find themselves trying to explain their support of C-51 on hundreds of thousands of doorsteps across Canada.
But then the boldness dried up.
Eager to show that New Democrats were not wild-eyed spenders, the party embraced small-bore proposals based on a commitment to balance the budget. The commitments lacked ambition compared with those of the Liberals, and also seemed to many to be unrealistic, since they were predicated on revenues that assumed a $63 barrel of oil.
Outmanoeuvred on the left
"Ours is the most progressive platform in this election." That became one of Justin Trudeau's favourite lines during this campaign, as he pitched a tax hike on the top one per cent of income earners, an aggressive infrastructure plan financed by deficits, means-tested child benefits and the legalization of marijuana.
By contrast, the NDP's balanced budget approach looked staid and conservative.
Trudeau's core message, repeated over and over throughout this campaign was: "Stephen Harper won't help you, and Tom Mulcair can't help you, because he's signed on to Harper's budget."
In the end that message proved more damaging to the New Democrats than even the niqab.
It was Trudeau who correctly read the zeitgeist among change voters: They wanted their change big, and they wanted it now.
The muting of 'Angry Tom'
The party was also too anxious to bottle up "Angry Tom," and repackage him as a more friendly and soft-spoken politician. The result was unnatural.
At the first English-language debate, many viewers commented on his strange, frozen smile. Gone was the leader who had fiercely grilled Harper over the Duffy scandal in question period exchanges.
Trudeau is a natural-born campaigner, and Mulcair would always have found it tough to work a crowd the way Trudeau does. Mulcair never really mastered the art of speaking to a crowd. His approach is: I talk — you applaud. I talk — you applaud, all delivered in the same flat tone.
Trudeau speaks with a wide range of tone and emotion, talking over the applause, letting the crowd drown him out, then roaring back to the message, carrying his listeners with him.
I watched Mulcair deliver a speech on Sept. 22 at the University of Ottawa, where students packed the atrium and hung over internal balconies and staircases on four storeys. It was a crowd that was there to be stirred, and ready to respond in kind.
Instead, they got a laundry list of the NDP's platform from a man who seemed more prime ministerial than passionate. Mulcair shared their rejection of the Harper government on an intellectual level, but not a visceral one.
Mulcair was never going to be able to shine the way Trudeau can. But in an election where seven out of 10 voters said they were hungry for change, a bit of righteous anger would have been a good substitute.
The NDP has a tradition of allowing leaders to remain after defeats, unlike the Liberals and Conservatives, whose leaders are expected to fall on their swords.
And while he may not have been as good a campaigner as Jack Layton, Mulcair's undeniable skills as a parliamentarian could be vital in the short term as he tries to keep his reduced caucus relevant..
Complicating that task is the fact that the government he is up against is no longer that of Harper, the bête noire of the left, but rather the friendly, progressive government of Trudeau.
One issue where he can credibly challenge Trudeau is on Bill C-51, the surveillance law that the Liberals both condemned and voted for. Many Liberals were uncomfortable with their leader's support for the law, and the party's explanations for its posture have always seemed convoluted and unconvincing.
It also wouldn't hurt to remind the voters of that principled stand, which was far more popular than the equally principled stand over the niqab.
A turn to the left?
Mulcair need only look at the recent history of British Labour to see that a social democratic party can tack to the centre, and carry its supporters with it, only as long as that strategy produces electoral results.
Once the strategy fails, the old left tends to return with a vengeance (see Jeremy Corbyn).
Those voices in the NDP may be all the louder given that Trudeau appeared to pass the NDP on the left. If Mulcair now opposes Trudeau's plans to stimulate the economy with infrastructure spending, taking the same side as the Conservatives surely will, the rumbling will only grow.
Already, there is unease in the party's grassroots about Mulcair's peremptory dismissal of candidates during this campaign for even fairly mild criticism of Israeli government policies.
From now on, he will find it much harder to discipline and silence the critics within.
Also on HuffPost