A spokesman for Kurdish forces in Iraq say a Canadian soldier was killed in a friendly fire incident after he and others ignored an order to stay in their car and showed up to the front line unannounced.

Peshmerga spokesman Halgurd Hekmat says a group of Canadian soldiers showed up in the village of Bashiq on Friday unannounced. The area had seen heavy fighting against Islamic State militants.

Hekmat told The Associated Press on Sunday: "When they returned, the peshmerga asked them to identify themselves. They answered in Arabic, that's when peshmerga started shooting."

Hekmat says he doesn't know why the Canadians were there. Canadian officials could not be immediately reached for comment.

Canada identified the slain soldier as Sgt. Andrew Joseph Doiron of the Canadian Special Operations Regiment.