A quick-thinking refueling plane crew saved a fighter pilot who faced having to eject over Islamic State territory.

The F-16 had been trying to refuel in mid-air when the pilot discovered a malfunction with his fuel system, which meant he could only fly for 15 minutes - nowhere near enough to reach safety.

Instead of leaving the pilot to cope with the emergency himself, the US Air Force KC-135 Stratotanker crew managed to escort him back to its base while refueling every 15 minutes to keep the jet in the air.

US Air Force commander Lt Col Eric Hallberg said: "Over 80% of his total fuel capability was trapped and unusable.

"Knowing the risks to their own safety, they put the life of the F-16 pilot first and made what could've been an international tragedy a feel-good news story.

The jet first ran into trouble when it connected to the KC-135 but was forced to disconnect after taking on 500lbs of fuel - just a fifth of the 2,500lbs it should have had.

After a second failed attempt to refuel, the pilot ran through a checklist and was able to tell the tanker crew about the fuel emergency.

The Air Force did not reveal where the incident took place or which country the F-16 pilot was from.

The tanker crew's actions may have saved the airman from a fate like that of Jordanian pilot Moaz al-Kassasbeh, who was shown being burned alive in pictures and video by IS extremists after he ejected and was captured.

Click for more from Sky News.