OTTAWA -- A Canadian special forces soldier has been killed and three others wounded in a friendly fire incident in northern Iraq.

National Defence says the troops, who were training local forces, had just returned to an observation post at the front line when they were mistakenly fired upon by Kurdish fighters late Friday.

The military identifies the soldier as Sgt. Andrew Joseph Doiron, from the Canadian Special Operations Regiment, based at Garrison Petawawa, Ont.

In a statement, the military says the three wounded members are receiving medical care, but it does not indicate the extent of their injuries or whether they will have to be moved to a larger medical facility.

The incident comes as the Harper government is actively debating whether to extend the country's combat mission against the Islamic State, which is due to expire at the end of the month.

Prime Minister Stephen Harper is expressing "deep sadness" over the death of Doiron, but in a statement he also stressed it's imperative that the coalition air strikes against the Islamic State continue.

"Our Government and the Canadian Armed Forces take the duty to protect Canadians seriously," Harper's statement said. "Part of that duty requires us to stand tall and shoulder our share of the burden in the fight against ISIL."

The special forces, roughly 69 of them, were sent to help training Kurdish fighters last September in a mission that was billed as non-combat and one where the elite troops would work far behind the front lines.