TORONTO – A Canadian special forces soldier was killed and three others wounded in a friendly fire incident in northern Iraq, Canada's defense department said Saturday.

Canadian troops training local forces had just returned to an observation post at the front line Friday night when they were mistakenly fired upon by Kurdish fighters, the military said.

The slain soldier was identified as Sgt. Andrew Joseph Doiron, from the Canadian Special Operations Regiment, based at Garrison Petawawa, Ontario.

The four soldiers were transported to a coalition medical facility for treatment, where one of them died of his wounds, said a statement released by the Combined Joint Task Force -- Operation Inherent Resolve, the U.S.-led coalition conducting air strikes and training local forces to fight the Islamic State group. Canadian Defense Minister Jason Kenney said the three wounded soldiers are in stable condition.

The fact that Canadian special forces have been training and assisting on the front lines and directing air strikes has stirred controversy in Canada, but Kenney said the rules of engagement will remain the same.

Kenney said the killing had "nothing to do with combat," saying it was a case of mistaken identity on the part of Kurdish fighters at night.

"It was caused by a failure of identification. There will be an inquiry," Kenney said.

Doiron is the fifth non-Iraqi coalition military member to have died as part of the campaign against the Islamic State group in Iraq and Syria, according to a coalition spokesman, U.S. Army Captain John Moore. Two U.S. Marines were killed in noncombat incidents and a U.S. Air Force pilot died when his F-16 crashed in Jordan. A Jordanian pilot was captured in December after his plane crashed in Syria, and he was burned to death by Islamic State militants sometime in January.

Canadian Prime Minister Stephen Harper expressed "deep sadness" over the death of Doiron, but also stressed that it is imperative that the coalition efforts against the Islamic State group continue.

"Part of that duty requires us to stand tall and shoulder our share of the burden in the fight against ISIL," Harper said, using another acronym for the group which has taken control over vast swaths of territory in Iraq and Syria.

The incident comes as the Canadian government is actively debating whether to extend the country's combat mission against the Islamic State group, which is due to expire at the end of the month. Canadian Foreign Minister Rob Nicholson said this past week that Canada would be in Iraq for the long term.

"The mission will continue," Kenney, the defense minister, said Saturday. "This is a sad and tragic incident ... such incidents occur in all military deployments. It's part of the inherent risk."

Canada has 69 special forces soldiers with Kurdish peshmerga fighters in what the government calls an advising and assisting role. They were sent to help train Kurdish fighters last September in a mission that was billed as noncombat with the elite troops working far behind the front lines. Harper told Parliament in late September that the soldiers would not accompany the Kurdish fighters, but a Canadian general said in January that they do 80 percent of the training and advising behind the front lines and about 20 percent right at the front lines.

The general also revealed then that Canadian soldiers have been helping the Kurdish fighters by directing coalition airstrikes against Islamic State fighters, a role generally considered risky because it means they are close to the battle against the militants.

The Canadians' efforts complement those of the United States, which has conducted the vast majority of the airstrikes against the Islamic State group. But in their new role, the Canadians are performing a task in targeting airstrikes that so far the U.S. has been unwilling to do. Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff, has repeatedly said the U.S. would consider directing attacks from the ground but that it has not done so.

Canada is among several dozen countries that have joined the U.S.-led coalition fighting the Islamic State group. Canada sent special forces and joined the air combat mission after a request from President Barack Obama. Canada has six CF-18 fighter jets, two surveillance planes, a refueling tanker aircraft and 600 airmen and airwomen based in Kuwait as part of the mission.