Both men serve with 51 Squadron RAF Regiment based at RAF Lossiemouth in Moray.
The Ministry of Defence last night said military police were investigating the photographs, which were taken after a dramatic attack on Camp Bastion in September 2012. Defence chiefs were made aware of the images some weeks ago.
The two RAF gunners were last month on a subsequent tour of Afghanistan and serving on the frontline. An MoD source confirmed they have been withdrawn from those duties. It is not clear if they have been flown back to Scotland.
In two of the pictures, at least one and possibly two members of the RAF Regiment can be seen kneeling next to the body of a dead insurgent and giving a thumbs-up sign.
It is feared the alleged incident could spark a backlash in Afghanistan against servicemen and women.
The pictures also show some of the damage caused during the attack on the UK’s main base, which left two US marines dead.
Several British personnel were injured in the attack while six United States Harrier jump jets were destroyed and a further two damaged at a cost of tens of millions of pounds.
Prince Harry was serving at the base as a member of the Army Air Corps at the time of the attack on Friday, 14 September.
An RAF spokeswoman said last night: “This type of behaviour is unacceptable and will not be tolerated. The RAF is treating this incident extremely seriously and has launched a military police investigation.”
She added that the Special Investigations Branch were probing the alleged incident.
An RAF source said he was making “no excuses” for the behaviour but said it was important to consider the context.
“This was a long, extensive firefight against a well-drilled, well-armed enemy who was trying to kill them,” the source said.
He spoke of the “heat of conflict”, the “relief of victory” and the “unusual adrenaline-fuelled situation” in which “foolish” things happened.
However, Joanne Mariner, director of law and policy at Amnesty International, said the pictures were “appalling”.
“They violate international humanitarian law standards, including common article 3 of the Geneva Conventions, which prohibit the disrespectful and degrading treatment of the bodies of dead combatants,” she said.
“There must be a thorough and impartial investigation into this incident. It is encouraging to learn that the UK military has instigated one.”
According to a report from the MoD, 15 heavily armed insurgents dressed in United States army uniforms and armed with PKM machine guns, AK-47 rifles and rocket-propelled grenades broke through perimeter defences and initially targeted tower guards with heavy fire under cover of darkness.
RAF Regiment gunners – who guard Camp Bastion against attack – were deployed to retake the airfield and were engaged in a four-hour gun battle with the Taleban.
US and British troops killed 14 of the attackers and wounded the remaining one, who was detained and interrogated.
On their return to Scotland, they received a heroes’ welcome and were praised for their bravery. Station commander of RAF Lossiemouth, Group Captain Ian Gale, commended them
for their “courage and professionalism in the face of the enemy”.
Last month, a report by the Commons cross-party defence committee said British commanders had to “bear a degree of responsibility” for failing to prevent the raid.
Only 11 of 24 guard towers at the base in Helmand province were manned when the insurgents entered the camp.
MPs described the attitude of the MoD as “obstructive and unhelpful” when they were trying to establish the facts of the attack. The committee also said it was “unimpressed” by the evidence from the chief of joint operations, Lt Gen David Capewell.Though the US was responsible for protecting Camp Bastion at the time – and two US marine generals were dismissed as the result of the attack – the defence committee said: “British commanders must bear a degree of responsibility for these systemic failures and associated reputational damage.”
During the 2012 tour of Afghanistan, 150 personnel from Lossiemouth were deployed to protect RAF and US aircraft and helicopters. The gunners were responsible for an area of some 700 square kilometres and also provided protection for the Medical Emergency Response Team, defending a Chinook helicopter while it was collecting casualties.
The Moray-based troops took part in 183 emergency evacuations during their tour, saving both coalition and Afghan lives.
And in July 2012, 51 Squadron took part in Operation Cheetah’s Rising, when helicopter gunners joined forces with US Marines to set up vehicle checkpoints to stop and search suspicious vehicles operating in the area.
The pictures incident is the latest scandal involving soldiers from coalition forces allegedly posing for photos alongside bodies of dead Afghan fighters.
In 2012, president Barack Obama branded the conduct of US soldiers “reprehensible” when it emerged they had been pictured with the remains of dead suicide bombers.
A year earlier, Afghan president Hamid Karzai described the behaviour of US soldiers as “disgusting” when they were shown urinating on the bodies of Taleban fighters.