Friends and family of Sgt. Andrew Joseph Doiron, who was killed by "mistaken" combat in Iraq, remember the man as a passionate soldier dedicated to protecting Canada against terrorism.

Doiron's death on Friday marked Canada's first casualty as part of the U.S.-led coalition's war on the extremist Islamic State in Iraq and Syria group. The Canadian government and Kurdish officials are publicly at odds over what happened in the incident.

Kurdish officials said Sunday that Doiron was killed after he and other Canadian soldiers showed up to the front line unannounced to call in airstrikes. But a high-level Canadian government source disputed that account, telling CBC News that Doiron and three fellow soldiers were a couple hundred metres from the front line and had pre-arranged a rendezvous with Kurdish troops that went awry.

Doiron was originally from Moncton, N.B., and graduated from an area high school in 2001, friends say. He then attended Algonquin College in Ottawa.

At the time of his death, Doiron was an adviser with the Canadian Special Operations Regiment, based at Garrison Petawawa, Ont. He was also part of a 69-member team assisting Iraqi Kurdish forces in the fight against the Islamic State of Iraq and Syria, or ISIS.

An undated photo of Sgt. Andrew Joseph Doiron taken during a Canadian Forces mission. (Facebook) From Moncton to Ottawa, several people shared their memories of Doiron on social media, including on a commemorative Facebook page .​

From his home in Moncton, Marc Melanson said he met Doiron in middle school and they knew each other for almost 20 years. He said his friend was always certain about his military path, sharing his memories in an online message.

"Andrew is the first person I met who personality screamed, 'What you see is what you get,'" Melanson wrote.

"Andrew surrounded himself with what made him happy and never bothered with the rest. I’m sure that was not easy for him at times, but that’s just the person he was and I admire him for that."

Flags were flown at half-mast at the entrance to Garrison Petawawa on Sunday to honour Doiron, who loved being a soldier, according to Melanson.

"His eyes would light up every time he talked about it. He talked about the brother-like bond he had with his peers and how he was in his element when he was with them," Melanson wrote.

'He had a passion and a mission'

In a high school yearbook from 2001, Doiron's graduating year, he listed his future ambition as "antiterrorisme" in French, the CBC's Matthew Bingley reported from Moncton.

The flag at the entrance to Garrison Petawawa, Ont., is seen flying at half mast on Sunday, March 8, 2015 in honour of Sgt. Andrew Joseph Doiron. (Kamil Karamali/CBC) That belief never changed, according to Brian Joseph, who also honoured his friend on Facebook for his dedication to serving Canada.

"Andrew Doiron was a true warrior and a great Canadian. Every citizen of this country should be proud and appreciative that men of his construct emerge from our society," Joseph wrote.

"Andy didn't have a 'job' or 'duties' — he had a passion and a mission, and he performed his mission with efficiency, efficacy, class, and professionalism. Men like Andy are the cream of our society, and they risk everything to ensure that that society thrives. Take a moment to think about him, his family, and the three wounded operators and their families."

Doiron was 'fearless,' Moncton mayor says

There has been some disagreement over what caused the mistaken combat, which killed Doiron and injured three other Canadian soldiers.

The Iraqi Kurdish forces say Doiron and others had ignored an order, sparking the Kurdish reaction. On Saturday, Defence Minister Jason Kenney said the death resulted from mistaken identity, adding there would be an inquiry.

Also on Saturday, Prime Minister Stephen Harper, chief of the defence staff Gen. Tom Lawson, Kenney and others offered their condolences to Doiron's friends and family.

An undated photo shows Sgt. Andrew Joseph Doiron during training. (Facebook) On Sunday, New Brunswick Premier Brian Gallant and the mayor of Moncton did the same.

"It's a great loss to our community and certainly to his family. I want to express my sincere condolences to his mother and his father and his sister," said George Leblanc, Moncton's mayor.

"I knew Andrew and I know his family. He was a tremendous young man. In my experience he was fearless and I'll tell you, if I was in a place where I needed someone to have my back, he's the person that I would want there."

Doiron's body was flown back to Canada on Sunday morning after a ramp ceremony, according to multiple sources. A complete repatriation ceremony is expected to take place mid-week.