A near-total red sweep of the Toronto suburbs and the country took several Conservative cabinet ministers with it.
Few of them had attracted as much recent attention as Chris Alexander, the young diplomatic star whose Immigration and Citizenship portfolio put him in the line of fire on the election's central issues of multiculturalism and refugee accommodation.
As he conceded his Ajax riding Monday night to former Liberal MP Mark Holland, who lost in the 2011 election, Mr. Alexander acknowledged the campaign had been hard on him.
But he claimed few regrets from his term or from the election, saying issues like the niqab and the Syrian refugee crisis took on a life of their own for reasons outside his party's control, and that Canadians would "undoubtedly" come to see the Harper government as one of its best ever.
"Anyone who's new to politics or who's new to cabinet is learning," he said. "But I think on immigration, we have done very important things that have enormous support, not just among Conservatives but among NDP and Liberal supporters as well."
Mr. Alexander's political career was closely watched by those who had followed his prodigy-like rise through diplomatic ranks to an appointment as ambassador to Afghanistan at 34.
His reputation as an insightful, fair-minded international figure also helped him win his seat in 2011.
"He came from Afghanistan, and he had a lot of connections," said Waqqas Syed, the president of Masjid-E-Quba mosque in Ajax.
Mr. Alexander's message in 2011, said Mr. Syed, was "I'm not a stranger to you." That year, he won over about half of the local Muslim community and beat Mr. Holland by a six-point margin.
He was named immigration minister in 2013. But his tenure was rocky, and he found himself at the centre of one of the party's toughest episodes of the election, after a photo of the body of three-year-old Syrian refugee Alan Kurdi spread around the world, focusing attention on Canada's handling of that country's refugee crisis.
The Tories' other election strategies made for an awkward campaign in Ajax, with Mr. Alexander visiting Mr. Syed's mosque just a week before the party vowed to create a tip line to stop "barbaric cultural practices."
However, many voters' minds were made up before the election began, Mr. Syed said. They objected to bills C-24 and C-51, the first allowing the government to strip citizenship from Canadians convicted of terrorism, and the second a far-reaching security bill, he said.
Mr. Alexander said his single biggest regret was not making a bigger effort to publicize Canada's resettlement of 10,000 Syrian refugees before the party ended up on the defensive.
Mr. Holland, during a raucous election-night party, said he thought Canadians became tired of the "negativity" of the Conservatives overall.
"I went through losing four years ago; it's a very difficult thing," he said.
"I think for me, this is an even greater experience than in 2004, because I appreciate it more. When you get to come back, you're that much more appreciative of the opportunity."
A young star of his own party during his three terms, Mr. Holland had fashioned himself into an aggressive and outspoken opponent of the Conservative government, especially as public safety critic. He said it was too early to talk about what his role might be within a Trudeau government.