OTTAWA -- It was their job interview for the position of international statesman.

For the three federal leaders, Monday's foreign policy debate exposed some sharp differences on how they'd shepherd Canada through a turbulent world.

Stephen Harper found himself under frequent attack, fending off the narrative that he'd made Canada a meaner, less respected global citizen in his near decade in power.

It's been a common claim that critics of the Conservative leader's foreign policy make --that his government is less kind to refugees, that it is a climate-change laggard, that it sees military might as paramount to diplomatic nuance.

So it was no surprise it was the main line of attack from Harper's two rivals, Liberal Leader Justin Trudeau and NDP Leader Tom Mulcair, in the first-ever leaders' debate to focus on foreign policy.

But the opposition leaders also had to show how, exactly, they would do things differently.

Trudeau called for a return to the multilateral engagement that dominated Canada's foreign policy before the Conservative leader won power in 2006. For him, that means more peacekeeping, and asserting Canada's voice in international diplomacy so it can speak with more authority with allies against "bullies" such as Russian President Vladimir Putin.

He also launched a passionate offensive on why Canada needs to be more welcoming of refugees, evoking the 19th century Irish potato famine.

Harper largely stood his ground at Toronto's Roy Thomson Hall, saying that Canada wants to welcome more refugees, and will; but the government has to be mindful of terrorists hiding among them in a world beset by Islamic militants.

Despite the attacks, Harper had a powerful ace up his sleeve -- the fact he is already an international statesman. Harper simply described his own forays to refugee camps in northern Iraq and Jordan, saying he'd seen the suffering first hand, and been given the high-level security briefings that informed him of the hidden risks.

From the opening of the debate, it was Mulcair who found himself on the defensive.

On the fight against the Islamic militants, Mulcair was asked to justify his decision to end Canadian participation in the bombing campaign in Iraq and Syria, and quickly bring home special forces trainers working in Iraq --months before the original commitment expires next March.

When exactly, the NDP leader was asked, would an NDP government use force?

"We understand that there will be times when we have to, either under the NATO charter or under our international obligations at the UN, to use force and we won't shy away from that. But the real question here, is that the only thing that we can do?"

For Trudeau and Mulcair, there was an occasional hint of nostalgia, a longing for a time when they say Canada was considered perhaps kinder on the world stage.

Trudeau attacked Harper for not allowing more Syrian refugees into Canada, digging deep into history, to remind him how in 1847, 38,000 Irish arrivals flooded "the shores of Toronto," then a city of 20,000, to help build the country of today. It was an image that Mulcair also evoked when he referenced his own descendants.

"Canada has always done more," said Trudeau. "It's not about politics; it's about being the country that we have always been. And not only are you reneging on our duty as Canadians, not only are you failing us, the entire world is looking at Canada and saying, 'what is going on'?"

Harper turned that longing for bygone eras back on his opponents, suggesting they are out of touch with a complex, dangerous world.

Harper said he'd consulted with his own officials, and with international institutions like the World Bank and approved the arrival of 10,000 additional refugees -- the same number as the U.S., a country 10 times Canada's size.

"I think we're responding in a way that is responsible and also generous. And that's the responsibility of the government of Canada not to chase headlines. It's to make sure we act in a way that we can actually fulfil."

Harper also fended off attacks on his environment policy. Trudeau said Harper made Canada a "laggard" on the world stage. But the prime minister maintained that greenhouse gas emissions had gone down on his watch, and that Trudeau's Liberal predecessors failed to act on the Kyoto Protocol before that.

On trade, Mulcair accused Harper of compromising the interests of the auto and agricultural sectors in the current 12-country Trans-Pacific Partnership negotiations. But Harper fired back, saying "having privileged trade access to the economies of the world" was crucial to Canada's future economic success.

Said Harper: "You don't get those deals by coming up with a million reasons why you're against them before you even get to the table."