Another member of the elite force killed several militants with his bayonet while others clubbed terrorists with their weapons.

Sources told the Daily Star Sunday the SAS were convinced they were about to die after being encircled. But instead of surrendering they decided to “go out” fighting by killing as many terrorists as possible.

The SAS team had just withdrawn from an intelligence gathering operation close to the town of Mosul in northern Iraq, when they were ambushed by a force of up to 50 IS militants.

Over the next four hours the British troops were caught up in a fighting withdrawal across the Iraqi countryside.

By early evening, the British troops had killed at least 20 IS fighters but had almost used up their entire supply of ammunition.

One source said: “The SAS unit was trapped in a small river bed. They did a quick ammo check and realised they had less that 10 bullets left between them.

“They knew that if they were captured they would be tortured and decapitated.

“Rather than die on their knees, they went for a soldier’s death and charged the IS fighters who were moving along the river bed. They were screaming and swearing as they set about the terrorists.”

The source said that the SAS soldiers fixed bayonets, others drew their knives. They then shook hands and said their goodbyes before charging into the group of around 30 IS fighters.

He added: “They fired off their few remaining bullets and dropped several terrorists before setting about them with whatever weapons they had.

“They bayoneted, slashed and beat the IS fighters to death.

One soldier, a Warrant Officer in the SBS, drowned one of the terrorists in a small puddle forcing his face into the mud and holding him down until he stopped moving.

“He then picked up a stone and smashed it into the face of another gunman wrestling with one of his colleagues.

“Another killed three of the fighters by using his assault rifle as a club. Others were stabbing at the gunmen who wanted to capture the British troops alive.”

The source said the SAS fought like “crazed warriors”.

Their only plan was to kill as many of the terrorists as possible before they were killed.

He continued: “It was a classic case of Who Dares Wins. After five minutes of intense fighting around 12 IS fighters were dead or severely wounded.

“The remainder had fled in panic. Nearly all of the SAS troopers have been wounded with at least two sustaining gunshot wounds.”

The unit then walked five miles to a rendezvous position where they were met by Kurdish fighter who transported them back to an SAS base.

It is understood every member of the same unit returned to operations two days later apart from two soldiers who had suffered minor gunshot wounds.