Erbil, Iraq: A secret, failed mission by the United States military to rescue American hostages, including the murdered journalist James Foley, has been described in full by an eyewitness on the ground.

Two dozen Delta Force commandos landed in Syria in the early hours of July 4 - US Independence Day - but failed to find the hostages and were forced to retreat after a gun battle with Islamic State kidnappers.

American journalist James Foley in Boston in 2011. Credit:AP

Abu Ibrahim, a resident of Raqqa, the eastern Syrian city that has become the "capital" of the jihadists' self-declared caliphate, posted an account of the raid on Facebook.

Abu Ibrahim, who uses a pseudonym for fear of being targeted by Islamic State (also known as ISIL), said most of the account was quickly removed by Facebook's administrators.