A Canadian sniper who killed an Isis fighter 3,460 metres (2.1 miles) away – smashing the world record – may have saved the lives of Iraqi soldiers who were about to come under attack, a senior officer has said.

Brigadier General Peter Dawe told The Canadian Press news agency that a group of Isis militants had been gathering for a major surprise attack on the Iraqi force.

But, when the shot was made, the Isis group took cover and did not launch the attack, he added.

The previous record for the longest confirmed shot – fractionally under 1,000 metres – was held by Craig Harrison, a member of the British armed forces.

Some have reacted with disbelief at the idea it is possible to make such a long shot, but it was reportedly captured on video and the distance was based on “hard data” not an “approximation”, a military source said.

General Dawe defended the decision to take the shot even though Canada’s mission in Iraq is meant to be a non-combat one.

“This attack was massing unbeknownst to our partner forces because it was happening very quickly in a very dynamic sort of environment,” he said.

“And so our team was able to engage, and not only successfully that particular enemy fighter, but pre-empt a mass attack. So that's a significant achievement.”

He said the sniper was abiding by the rules laid down for the military by the Canadian Government.

“Canadian troops are not leading offensive operations,” General Dawe said.

“But when you're advising and assisting, it’s exactly what those two terms would suggest.

“To assist effectively means to also look after the partner forces with whom you’re working.”

He declined to give further details about the shot to avoid supplying information that might endanger Canadian troops.

In pictures: Civilians freed from Isis in Manbij Show all 11 1 /11 In pictures: Civilians freed from Isis in Manbij In pictures: Civilians freed from Isis in Manbij Women and children celebrating after being freed from Isis in Manbij, Syria, on 12 August Reuters In pictures: Civilians freed from Isis in Manbij A man cuts the beard of a civilian who was freed from Isis by the SDF in Manbij on 12 August Reuters In pictures: Civilians freed from Isis in Manbij Women carry newborn babies while running after being freed from Isis in Manbij, Syria, on 12 August Reuters In pictures: Civilians freed from Isis in Manbij A woman freed from Isis hugs an SDF fighter in Manbij on 12 August Reuters In pictures: Civilians freed from Isis in Manbij A woman adding her veil to a pile of niqabs burning in Manbij, Syria, after being freed from Isis on 12 August Reuters In pictures: Civilians freed from Isis in Manbij Children celebrating on top of a lorry after being freed from Isis in Manbij, Syria, on 12 August Reuters In pictures: Civilians freed from Isis in Manbij A man and child freed from Isis by the SDF in Manbij on 12 August Reuters In pictures: Civilians freed from Isis in Manbij A woman carrying her children walks towards SDF fighters after being freed from Isis in Manbij, Syria, on 12 August Reuters In pictures: Civilians freed from Isis in Manbij A woman and child freed from Isis in Manbij, Syria, on 12 August Reuters In pictures: Civilians freed from Isis in Manbij An SDF fighter kisses a crying man who was freed from Isis in Manbij, Syria, on 12 August Reuters In pictures: Civilians freed from Isis in Manbij Hundreds of civilians freed from Isis in Manbij, Syria, on 12 August Reuters

But he added: “We've been very transparent to Canadians in terms of what our troops are doing.