It was a commitment that in Mr Harper's nearly 10 years as prime minister had seen Canada, long viewed in the region as an honest, if minor, broker in the Arab-Israel conflict, shift emphatically and unequivocally to the Israeli side.
While he will undoubtedly remain a friend of Israel, the incoming prime minister Justin Trudeau will also be aiming to repair relations with the Arab world in order to assert his firm belief that a two-state solution requires dialogue with both sides.
By contrast, Mr Harper managed to convey the impression that Muslims and Arabs were not to be trusted, most tellingly in his handling of the Syrian refugee crisis.
His government's response during the campaign to the drowning death of three-year-old Alan Kurdi, who was attempting with his sister and parents to join family in Canada, highlighted the hard fact that only a tiny number of refugees have been allowed into the country.
Early on in the campaign, Mr Trudeau committed Canada to taking 25,000 refugees immediately and he clearly caught the mood of the voters when he said:
"Canadians get it, that this is about doing the right thing, it is about living up to the values that we cherish in this country."
And if there was a swing moment in this election, it was probably a debate in the province of Quebec, in French, about the niqab (a face veil).
Mr Harper had opposed the wishes of a new Canadian citizen to wear her niqab to the swearing in ceremony, even taking the case to the Supreme Court, where he lost. But he clung to his position that the niqab threatened the fabric of Canadian society.
"Most Canadians believe that it is offensive that someone would hide their identify at the very moment where they are committing to join the Canadian family," was how he put it.
Mr Trudeau on the other hand argued: "It's obvious that he's playing very reckless and dangerous games, pitting Canadians against one another for a narrow political goal."
Mr Trudeau also took the view that Canada should withdraw its fighter jets from the bombing campaign against the so-called Islamic State.
But in a deft touch that showed he is no pacifist he promised to commit more troops to training up Iraqi and Kurdish ground forces to fight the jihadists while calling time on Canada's commitment to the aerial war.
On Iran, where the Harper government had cold-shouldered the nuclear deal and reaffirmed its support for Israel, Mr Trudeau again took a nuanced position, welcoming a "significant agreement" and affirming "the importance of a diplomatic solution while ensuring Iran cannot build a nuclear weapon."
On every major Middle East issue Mr Trudeau offered a fresh take. Mr Harper with his unquestioning support for Netanyahu and his deep suspicion of Iran and much of the Arab world brought nothing new to the table. Having staked out his position, he proved incapable of moving from it, a fatal flaw with an electorate hungry for change.
Indeed it is no small irony that while in the televised leaders' debates the Middle East received scant attention, on the campaign trail it may well have proven to be Stephen Harper's Achilles heel.
Now, with the rout of the Conservatives still fresh, the most pressing issue and the one that Mr Trudeau can act quickly on is the refugee crisis.
How Canada's new prime minister responds will be a clear indication of just how significant a Middle East policy realignment his government is prepared to undertake.
Bill Law is a Middle East analyst and a specialist in Gulf affairs. Follow him @BillLaw49
As Stephen Harper banged out the final piano chords to the Beatles song Hey Jude at a private dinner for Benjamin Netanyahu in Jerusalem last year, he underscored, albeit somewhat bizarrely, his absolute commitment to the Israeli leader.