Open this photo in gallery Prime Minister Justin Trudeau, Defence Minister Harjit Sajjan and Minister of Foreign Affairs Chrystia Freeland take part in North Atlantic Council Working Session at the NATO Summit in Brussels, Belgium on July 11, 2018. Sean Kilpatrick/The Canadian Press

The federal government has committed Canada to a new military mission in Iraq at the outset of a NATO summit where Canadian and European allies are under fire by U.S. President Donald Trump for what he considers insufficient defence spending.

Canada will assume command of a new NATO training mission in Iraq for one year, Prime Minister Justin Trudeau announced on Wednesday. A Canadian major-general, who the military said has not been selected yet, will serve as commander.

Up to 250 Canadian troops will be posted to Baghdad to help protect and guide the training of Iraqi government troops on measures to prevent a re-emergence of Islamic State militants and other threats. In 2014, when Islamic State jihadis overran Iraq, significant parts of the Iraqi government’s armed forces collapsed, with soldiers abandoning their uniforms and gear.

Story continues below advertisement

Related: Merkel hits back at Trump’s claim that Germany ‘totally controlled’ by Russia

Read more: Trudeau, Trump to meet at NATO for first time since G7

Trump, Trudeau and NATO: What the leaders are doing in Europe this week

Although the Iraqi government has regained control over much of its territory, even Baghdad remains extremely dangerous. A Canadian Global Affairs department travel warning for Iraq last month stated: “Car bombings, vehicle ambushes and mortar and rocket attacks occur regularly across the country, including Baghdad, … resulting in numerous fatalities.“

Only about 50 of the deployed Canadian soldiers will be assigned to train Iraqi troops, with the bulk of trainers coming from other NATO member countries. Another 125 Canadians will be assigned to provide “force protection” for NATO operations in and around Baghdad. A further 20 will be deployed to help run headquarters.

The Canadian troops in charge of security will be tasked with ferrying and protecting NATO trainers as they move in armoured SUVs and buses between Baghdad and two bases in the immediate region where training is taking place: Taji and Besmaya.

Four armed Griffon helicopters, piloted by Canadians, will also be used to move NATO soldiers in the area.

Story continues below advertisement

David Perry, vice-president and senior analyst at the Canadian Global Affairs Institute, a think tank, said he believes Mr. Trudeau’s Wednesday announcement was calculated to demonstrate to Mr. Trump that Canada is pulling its weight in defence contributions.

“This is a very tangible example,” Mr. Perry said of the new Canadian mission, adding that it helps underpin Canada’s argument it should be judged on its military contributions to international operations.

“We are proud to take a leadership role in Iraq, and work with our allies and the government of Iraq, to help this region of the Middle East transition to long-lasting peace and stability,” Mr. Trudeau said in a prepared statement on Wednesday.

NATO member-country leaders began their annual summit in Brussels on Wednesday, and Mr. Trump has been vociferously criticizing allies, including Canada, Germany and others, for failing to meet a NATO guideline to devote 2 per cent of their annual economic output to military spending.

Canada, which is expected to spend 1.23 per cent of its annual economic output on its military in 2018, has announced plans to boost defence spending, but still won’t reach 2 per cent. Canadian prime ministers, from Stephen Harper to Justin Trudeau, have said this country should instead be judged on the quality and regularity of its commitment to NATO missions. In 2014, however, Mr. Harper did sign a NATO communiqué that said countries below 2 per cent should “aim to move toward the 2-per-cent guideline within a decade.”

The Trudeau commitment will result in an increase in Canadian troops in Iraq, but General Jon Vance, the Chief of Canada’s Defence Staff, said in an interview that the total deployment will remain below a cap set for this country’s contribution to Iraq in 2016. At the time, the federal government said the cap was 830 Forces members.

Story continues below advertisement

Canada already has a refuelling plane, two Hercules transport aircraft, a medical facility, the Griffon helicopters and Canadian special forces in Iraq. For several years, Canadian special forces trained and advised Kurdish peshmerga from the semi-autonomous region of Kurdistan, on fighting Islamic State militants.

Gen. Vance said on Wednesday that the Canadian special-forces mission in Iraq will continue, separate from the new NATO deployment. He said special forces are currently training Iraqi forces in Mosul and are still taking part in some activities with the peshmerga. The military does not disclose the number of special operators there, but defence analysts expect it is currently several dozen.

In Brussels on Wednesday, Mr. Trump, having lambasted NATO members for failing to reach a target of spending 2 per cent of national income on defence, told fellow leaders he would prefer a goal of 4 per cent, similar to U.S. levels, officials said.

NATO Secretary-General Jens Stoltenberg said the aim first was to reach 2 per cent, but moments later Mr.Trump tweeted that allies were undercutting the United States on trade and needed to immediately increase spending.

With a report from Reuters